EMMA Coverage Report (generated Tue Mar 14 21:50:42 EST 2006)
[all classes][org.farng.mp3.id3]

COVERAGE SUMMARY FOR SOURCE FILE [FrameBodyUFID.java]

nameclass, %method, %block, %line, %
FrameBodyUFID.java0%   (0/1)0%   (0/8)0%   (0/57)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FrameBodyUFID0%   (0/1)0%   (0/8)0%   (0/57)0%   (0/18)
FrameBodyUFID (): void 0%   (0/1)0%   (0/3)0%   (0/2)
FrameBodyUFID (FrameBodyUFID): void 0%   (0/1)0%   (0/4)0%   (0/2)
FrameBodyUFID (RandomAccessFile): void 0%   (0/1)0%   (0/6)0%   (0/3)
FrameBodyUFID (String, byte []): void 0%   (0/1)0%   (0/11)0%   (0/4)
getIdentifier (): String 0%   (0/1)0%   (0/10)0%   (0/1)
getOwner (): String 0%   (0/1)0%   (0/5)0%   (0/1)
setOwner (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setupObjectList (): void 0%   (0/1)0%   (0/13)0%   (0/3)

1package org.farng.mp3.id3;
2 
3import org.farng.mp3.InvalidTagException;
4import org.farng.mp3.object.ObjectByteArraySizeTerminated;
5import org.farng.mp3.object.ObjectStringNullTerminated;
6 
7import java.io.IOException;
8import java.io.RandomAccessFile;
9 
10/**
11 * <h3>4.1.&nbsp;&nbsp; Unique file identifier</h3>
12 * <p/>
13 * <p>&nbsp;&nbsp; This frame's purpose is to be able to identify the audio file in a<br> &nbsp;&nbsp; database, that
14 * may provide more information relevant to the content.<br> &nbsp;&nbsp; Since standardisation of such a database is
15 * beyond this document, all<br>
16 * <p/>
17 * &nbsp;&nbsp; UFID frames begin with an 'owner identifier' field. It is a null-<br> &nbsp;&nbsp; terminated string
18 * with a URL [URL] containing an email address, or a<br> &nbsp;&nbsp; link to a location where an email address can be
19 * found, that belongs<br> &nbsp;&nbsp; to the organisation responsible for this specific database<br> &nbsp;&nbsp;
20 * implementation. Questions regarding the database should be sent to<br>
21 * <p/>
22 * &nbsp;&nbsp; the indicated email address. The URL should not be used for the<br> &nbsp;&nbsp; actual database
23 * queries. The string<br> &nbsp;&nbsp; &quot;http://www.id3.org/dummy/ufid.html&quot; should be used for tests. The<br>
24 * &nbsp;&nbsp; 'Owner identifier' must be non-empty (more than just a termination).<br>
25 * <p/>
26 * &nbsp;&nbsp; The 'Owner identifier' is then followed by the actual identifier,<br> &nbsp;&nbsp; which may be up to 64
27 * bytes. There may be more than one &quot;UFID&quot; frame<br> &nbsp;&nbsp; in a tag, but only one with the same 'Owner
28 * identifier'.</p>
29 * <p/>
30 * <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;Header for 'Unique file identifier', ID: &quot;UFID&quot;&gt;<br>
31 * &nbsp;&nbsp;&nbsp;&nbsp; Owner identifier&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;text string&gt; $00<br>
32 * &nbsp;&nbsp;&nbsp;&nbsp; Identifier&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
33 * <p/>
34 * &lt;up to 64 bytes binary data&gt;<br> </p>
35 *
36 * @author Eric Farng
37 * @version $Revision: 1.4 $
38 */
39public class FrameBodyUFID extends AbstractID3v2FrameBody {
40 
41    /**
42     * Creates a new FrameBodyUFID object.
43     */
44    public FrameBodyUFID() {
45        super();
46    }
47 
48    /**
49     * Creates a new FrameBodyUFID object.
50     */
51    public FrameBodyUFID(final FrameBodyUFID body) {
52        super(body);
53    }
54 
55    /**
56     * Creates a new FrameBodyUFID object.
57     */
58    public FrameBodyUFID(final String owner, final byte[] identifier) {
59        setObject("Owner", owner);
60        setObject("Identifier", identifier);
61    }
62 
63    /**
64     * Creates a new FrameBodyUFID object.
65     */
66    public FrameBodyUFID(final RandomAccessFile file) throws IOException, InvalidTagException {
67        this.read(file);
68    }
69 
70    public String getIdentifier() {
71        return "UFID" + ((char) 0) + getOwner();
72    }
73 
74    public void setOwner(final String owner) {
75        setObject("Owner", owner);
76    }
77 
78    public String getOwner() {
79        return (String) getObject("Owner");
80    }
81 
82    protected void setupObjectList() {
83        appendToObjectList(new ObjectStringNullTerminated("Owner"));
84        appendToObjectList(new ObjectByteArraySizeTerminated("Identifier"));
85    }
86}

[all classes][org.farng.mp3.id3]
EMMA 2.0.5312 (C) Vladimir Roubtsov