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

COVERAGE SUMMARY FOR SOURCE FILE [FrameBodyWXXX.java]

nameclass, %method, %block, %line, %
FrameBodyWXXX.java0%   (0/1)0%   (0/10)0%   (0/145)0%   (0/34)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FrameBodyWXXX0%   (0/1)0%   (0/10)0%   (0/145)0%   (0/34)
FrameBodyWXXX (): void 0%   (0/1)0%   (0/12)0%   (0/5)
FrameBodyWXXX (FrameBodyWXXX): void 0%   (0/1)0%   (0/13)0%   (0/5)
FrameBodyWXXX (RandomAccessFile): void 0%   (0/1)0%   (0/15)0%   (0/6)
FrameBodyWXXX (byte, String, String): void 0%   (0/1)0%   (0/27)0%   (0/8)
equals (Object): boolean 0%   (0/1)0%   (0/35)0%   (0/10)
getBriefDescription (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getIdentifier (): String 0%   (0/1)0%   (0/10)0%   (0/1)
getUrlLink (): String 0%   (0/1)0%   (0/5)0%   (0/1)
setUrlLink (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setupObjectList (): void 0%   (0/1)0%   (0/20)0%   (0/4)

1package org.farng.mp3.id3;
2 
3import org.farng.mp3.InvalidTagException;
4import org.farng.mp3.object.ObjectNumberHashMap;
5import org.farng.mp3.object.ObjectStringNullTerminated;
6import org.farng.mp3.object.ObjectStringSizeTerminated;
7 
8import java.io.IOException;
9import java.io.RandomAccessFile;
10 
11/**
12 * <p>&nbsp;&nbsp; This frame is intended for URL [URL] links concerning the audio file<br> &nbsp;&nbsp; in a similar
13 * way to the other &quot;W&quot;-frames. The frame body consists<br>
14 * <p/>
15 * &nbsp;&nbsp; of a description of the string, represented as a terminated string,<br> &nbsp;&nbsp; followed by the
16 * actual URL. The URL is always encoded with ISO-8859-1<br> &nbsp;&nbsp; [ISO-8859-1]. There may be more than one
17 * &quot;WXXX&quot; frame in each tag,<br> &nbsp;&nbsp; but only one with the same description.</p>
18 * <p/>
19 * <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;Header for 'User defined URL link frame', ID: &quot;WXXX&quot;&gt;<br>
20 * &nbsp;&nbsp;&nbsp;&nbsp; Text encoding&nbsp;&nbsp;&nbsp;&nbsp; $xx<br> &nbsp;&nbsp;&nbsp;&nbsp;
21 * Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;text string according to encoding&gt; $00 (00)<br>
22 * <p/>
23 * &nbsp;&nbsp;&nbsp;&nbsp; URL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
24 * &lt;text string&gt;<br> </p>
25 *
26 * @author Eric Farng
27 * @version $Revision: 1.4 $
28 */
29public class FrameBodyWXXX extends AbstractID3v2FrameBody {
30 
31    String description = "";
32    String urlLink = "";
33    byte textEncoding = 0;
34 
35    /**
36     * Creates a new FrameBodyWXXX object.
37     */
38    public FrameBodyWXXX() {
39        super();
40    }
41 
42    /**
43     * Creates a new FrameBodyWXXX object.
44     */
45    public FrameBodyWXXX(final FrameBodyWXXX body) {
46        super(body);
47    }
48 
49    /**
50     * Creates a new FrameBodyWXXX object.
51     */
52    public FrameBodyWXXX(final byte textEncoding, final String description, final String urlLink) {
53        setObject("Text Encoding", new Byte(textEncoding));
54        setObject("Description", description);
55        setObject("URL", urlLink);
56    }
57 
58    /**
59     * Creates a new FrameBodyWXXX object.
60     */
61    public FrameBodyWXXX(final RandomAccessFile file) throws IOException, InvalidTagException {
62        this.read(file);
63    }
64 
65    public String getBriefDescription() {
66        return this.getUrlLink();
67    }
68 
69    public String getIdentifier() {
70        return "WXXX" + ((char) 0) + this.description;
71    }
72 
73    public void setUrlLink(final String urlLink) {
74        setObject("URL", urlLink);
75    }
76 
77    public String getUrlLink() {
78        return (String) getObject("URL");
79    }
80 
81    public boolean equals(final Object obj) {
82        if ((obj instanceof FrameBodyWXXX) == false) {
83            return false;
84        }
85        final FrameBodyWXXX frameBodyWXXX = (FrameBodyWXXX) obj;
86        if (this.description.equals(frameBodyWXXX.description) == false) {
87            return false;
88        }
89        if (this.textEncoding != frameBodyWXXX.textEncoding) {
90            return false;
91        }
92        if (this.urlLink.equals(frameBodyWXXX.urlLink) == false) {
93            return false;
94        }
95        return super.equals(obj);
96    }
97 
98    protected void setupObjectList() {
99        appendToObjectList(new ObjectNumberHashMap("Text Encoding", 1));
100        appendToObjectList(new ObjectStringNullTerminated("Description"));
101        appendToObjectList(new ObjectStringSizeTerminated("URL"));
102    }
103}

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