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

COVERAGE SUMMARY FOR SOURCE FILE [FrameBodyPOPM.java]

nameclass, %method, %block, %line, %
FrameBodyPOPM.java0%   (0/1)0%   (0/8)0%   (0/75)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FrameBodyPOPM0%   (0/1)0%   (0/8)0%   (0/75)0%   (0/20)
FrameBodyPOPM (): void 0%   (0/1)0%   (0/3)0%   (0/2)
FrameBodyPOPM (FrameBodyPOPM): void 0%   (0/1)0%   (0/4)0%   (0/2)
FrameBodyPOPM (RandomAccessFile): void 0%   (0/1)0%   (0/6)0%   (0/3)
FrameBodyPOPM (String, byte, long): void 0%   (0/1)0%   (0/21)0%   (0/5)
getEmailToUser (): String 0%   (0/1)0%   (0/5)0%   (0/1)
getIdentifier (): String 0%   (0/1)0%   (0/10)0%   (0/1)
setEmailToUser (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setupObjectList (): void 0%   (0/1)0%   (0/21)0%   (0/4)

1package org.farng.mp3.id3;
2 
3import org.farng.mp3.InvalidTagException;
4import org.farng.mp3.object.ObjectNumberFixedLength;
5import org.farng.mp3.object.ObjectNumberVariableLength;
6import org.farng.mp3.object.ObjectStringNullTerminated;
7 
8import java.io.IOException;
9import java.io.RandomAccessFile;
10 
11/**
12 * <h3>4.17.&nbsp;&nbsp; Popularimeter</h3>
13 * <p/>
14 * <p>&nbsp;&nbsp; The purpose of this frame is to specify how good an audio file is.<br> &nbsp;&nbsp; Many interesting
15 * applications could be found to this frame such as a<br> &nbsp;&nbsp; playlist that features better audio files more
16 * often than others or<br>
17 * <p/>
18 * &nbsp;&nbsp; it could be used to profile a person's taste and find other 'good'<br> &nbsp;&nbsp; files by comparing
19 * people's profiles. The frame contains the email<br> &nbsp;&nbsp; address to the user, one rating byte and a four byte
20 * play counter,<br> &nbsp;&nbsp; intended to be increased with one for every time the file is played.<br> &nbsp;&nbsp;
21 * The email is a terminated string. The rating is 1-255 where 1 is<br>
22 * <p/>
23 * &nbsp;&nbsp; worst and 255 is best. 0 is unknown. If no personal counter is wanted<br> &nbsp;&nbsp; it may be
24 * omitted. When the counter reaches all one's, one byte is<br> &nbsp;&nbsp; inserted in front of the counter thus
25 * making the counter eight bits<br> &nbsp;&nbsp; bigger in the same away as the play counter (&quot;PCNT&quot;). There
26 * may be<br>
27 * <p/>
28 * &nbsp;&nbsp; more than one &quot;POPM&quot; frame in each tag, but only one with the same<br> &nbsp;&nbsp; email
29 * address.</p>
30 * <p/>
31 * <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;Header for 'Popularimeter', ID: &quot;POPM&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;
32 * Email to user&nbsp;&nbsp; &lt;text string&gt; $00<br>
33 * <p/>
34 * &nbsp;&nbsp;&nbsp;&nbsp; Rating&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $xx<br>
35 * &nbsp;&nbsp;&nbsp;&nbsp; Counter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $xx xx xx xx (xx ...)<br> </p>
36 *
37 * @author Eric Farng
38 * @version $Revision: 1.4 $
39 */
40public class FrameBodyPOPM extends AbstractID3v2FrameBody {
41 
42    /**
43     * Creates a new FrameBodyPOPM object.
44     */
45    public FrameBodyPOPM() {
46        super();
47    }
48 
49    /**
50     * Creates a new FrameBodyPOPM object.
51     */
52    public FrameBodyPOPM(final FrameBodyPOPM body) {
53        super(body);
54    }
55 
56    /**
57     * Creates a new FrameBodyPOPM object.
58     */
59    public FrameBodyPOPM(final String emailToUser, final byte rating, final long counter) {
60        setObject("Email to User", emailToUser);
61        setObject("Rating", new Byte(rating));
62        setObject("Counter", new Long(counter));
63    }
64 
65    /**
66     * Creates a new FrameBodyPOPM object.
67     */
68    public FrameBodyPOPM(final RandomAccessFile file) throws IOException, InvalidTagException {
69        this.read(file);
70    }
71 
72    public void setEmailToUser(final String description) {
73        setObject("Email to User", description);
74    }
75 
76    public String getEmailToUser() {
77        return (String) getObject("Email to User");
78    }
79 
80    public String getIdentifier() {
81        return "POPM" + ((char) 0) + getEmailToUser();
82    }
83 
84    protected void setupObjectList() {
85        appendToObjectList(new ObjectStringNullTerminated("Email to User"));
86        appendToObjectList(new ObjectNumberFixedLength("Rating", 1));
87        appendToObjectList(new ObjectNumberVariableLength("Counter", 1));
88    }
89}

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