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

COVERAGE SUMMARY FOR SOURCE FILE [FrameBodyRBUF.java]

nameclass, %method, %block, %line, %
FrameBodyRBUF.java0%   (0/1)0%   (0/6)0%   (0/61)0%   (0/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FrameBodyRBUF0%   (0/1)0%   (0/6)0%   (0/61)0%   (0/17)
FrameBodyRBUF (): void 0%   (0/1)0%   (0/3)0%   (0/2)
FrameBodyRBUF (FrameBodyRBUF): void 0%   (0/1)0%   (0/4)0%   (0/2)
FrameBodyRBUF (RandomAccessFile): void 0%   (0/1)0%   (0/6)0%   (0/3)
FrameBodyRBUF (byte, boolean, byte): void 0%   (0/1)0%   (0/24)0%   (0/5)
getIdentifier (): String 0%   (0/1)0%   (0/2)0%   (0/1)
setupObjectList (): void 0%   (0/1)0%   (0/22)0%   (0/4)

1package org.farng.mp3.id3;
2 
3import org.farng.mp3.InvalidTagException;
4import org.farng.mp3.object.ObjectBooleanByte;
5import org.farng.mp3.object.ObjectNumberFixedLength;
6 
7import java.io.IOException;
8import java.io.RandomAccessFile;
9 
10/**
11 * <h3>4.18.&nbsp;&nbsp; Recommended buffer size</h3>
12 * <p/>
13 * <p>&nbsp;&nbsp; Sometimes the server from which an audio file is streamed is aware of<br> &nbsp;&nbsp; transmission
14 * or coding problems resulting in interruptions in the<br> &nbsp;&nbsp; audio stream. In these cases, the size of the
15 * buffer can be<br> &nbsp;&nbsp; recommended by the server using this frame. If the 'embedded info<br>
16 * <p/>
17 * &nbsp;&nbsp; flag' is true (1) then this indicates that an ID3 tag with the<br> &nbsp;&nbsp; maximum size described
18 * in 'Buffer size' may occur in the audio<br> &nbsp;&nbsp; stream. In such case the tag should reside between two MPEG
19 * [MPEG]<br> &nbsp;&nbsp; frames, if the audio is MPEG encoded. If the position of the next tag<br> &nbsp;&nbsp; is
20 * known, 'offset to next tag' may be used. The offset is calculated<br>
21 * <p/>
22 * &nbsp;&nbsp; from the end of tag in which this frame resides to the first byte of<br> &nbsp;&nbsp; the header in the
23 * next. This field may be omitted. Embedded tags are<br> &nbsp;&nbsp; generally not recommended since this could render
24 * unpredictable<br> &nbsp;&nbsp; behaviour from present software/hardware.</p>
25 * <p/>
26 * <p>&nbsp;&nbsp; For applications like streaming audio it might be an idea to embed<br> &nbsp;&nbsp; tags into the
27 * audio stream though. If the clients connects to<br> &nbsp;&nbsp; individual connections like HTTP and there is a
28 * possibility to begin<br> &nbsp;&nbsp; every transmission with a tag, then this tag should include a<br> &nbsp;&nbsp;
29 * 'recommended buffer size' frame. If the client is connected to a<br>
30 * <p/>
31 * &nbsp;&nbsp; arbitrary point in the stream, such as radio or multicast, then the<br> &nbsp;&nbsp; 'recommended buffer
32 * size' frame SHOULD be included in every tag.</p>
33 * <p/>
34 * <p>&nbsp;&nbsp; The 'Buffer size' should be kept to a minimum. There may only be one<br> &nbsp;&nbsp;
35 * &quot;RBUF&quot; frame in each tag.</p>
36 * <p/>
37 * <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;Header for 'Recommended buffer size', ID: &quot;RBUF&quot;&gt;<br>
38 * &nbsp;&nbsp;&nbsp;&nbsp; Buffer size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
39 * $xx xx xx<br> &nbsp;&nbsp;&nbsp;&nbsp; Embedded info flag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %0000000x<br>
40 * <p/>
41 * &nbsp;&nbsp;&nbsp;&nbsp; Offset to next tag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $xx xx xx xx<br> </p>
42 *
43 * @author Eric Farng
44 * @version $Revision: 1.4 $
45 */
46public class FrameBodyRBUF extends AbstractID3v2FrameBody {
47 
48    /**
49     * Creates a new FrameBodyRBUF object.
50     */
51    public FrameBodyRBUF() {
52        super();
53    }
54 
55    /**
56     * Creates a new FrameBodyRBUF object.
57     */
58    public FrameBodyRBUF(final FrameBodyRBUF body) {
59        super(body);
60    }
61 
62    /**
63     * Creates a new FrameBodyRBUF object.
64     */
65    public FrameBodyRBUF(final byte bufferSize, final boolean embeddedInfoFlag, final byte offsetToNextTag) {
66        setObject("Buffer Size", new Byte(bufferSize));
67        setObject("Embedded Info Flag", new Boolean(embeddedInfoFlag));
68        setObject("Offset to Next Flag", new Byte(offsetToNextTag));
69    }
70 
71    /**
72     * Creates a new FrameBodyRBUF object.
73     */
74    public FrameBodyRBUF(final RandomAccessFile file) throws IOException, InvalidTagException {
75        this.read(file);
76    }
77 
78    public String getIdentifier() {
79        return "RBUF";
80    }
81 
82    protected void setupObjectList() {
83        appendToObjectList(new ObjectNumberFixedLength("Buffer Size", 3));
84        appendToObjectList(new ObjectBooleanByte("Embedded Info Flag", (byte) 1));
85        appendToObjectList(new ObjectNumberFixedLength("Offset to Next Tag", 4));
86    }
87}

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