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

COVERAGE SUMMARY FOR SOURCE FILE [FrameBodySIGN.java]

nameclass, %method, %block, %line, %
FrameBodySIGN.java0%   (0/1)0%   (0/10)0%   (0/89)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FrameBodySIGN0%   (0/1)0%   (0/10)0%   (0/89)0%   (0/23)
FrameBodySIGN (): void 0%   (0/1)0%   (0/3)0%   (0/2)
FrameBodySIGN (FrameBodySIGN): void 0%   (0/1)0%   (0/4)0%   (0/2)
FrameBodySIGN (RandomAccessFile): void 0%   (0/1)0%   (0/6)0%   (0/3)
FrameBodySIGN (byte, byte []): void 0%   (0/1)0%   (0/14)0%   (0/4)
getGroupSymbol (): byte 0%   (0/1)0%   (0/12)0%   (0/3)
getIdentifier (): String 0%   (0/1)0%   (0/18)0%   (0/1)
getSignature (): byte [] 0%   (0/1)0%   (0/5)0%   (0/1)
setGroupSymbol (byte): void 0%   (0/1)0%   (0/8)0%   (0/2)
setSignature (byte []): void 0%   (0/1)0%   (0/5)0%   (0/2)
setupObjectList (): void 0%   (0/1)0%   (0/14)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.ObjectNumberFixedLength;
6 
7import java.io.IOException;
8import java.io.RandomAccessFile;
9 
10/**
11 * <h3>4.28.&nbsp;&nbsp; Signature frame</h3>
12 * <p/>
13 * <p>&nbsp;&nbsp; This frame enables a group of frames, grouped with the 'Group<br> &nbsp;&nbsp; identification
14 * registration', to be signed. Although signatures can<br>
15 * <p/>
16 * &nbsp;&nbsp; reside inside the registration frame, it might be desired to store<br> &nbsp;&nbsp; the signature
17 * elsewhere, e.g. in watermarks. There may be more than<br> &nbsp;&nbsp; one 'signature frame' in a tag, but no two may
18 * be identical.</p>
19 * <p/>
20 * <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;Header for 'Signature frame', ID: &quot;SIGN&quot;&gt;<br>
21 * <p/>
22 * &nbsp;&nbsp;&nbsp;&nbsp; Group symbol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $xx<br> &nbsp;&nbsp;&nbsp;&nbsp;
23 * Signature&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binary data&gt;<br> </p>
24 *
25 * @author Eric Farng
26 * @version $Revision: 1.4 $
27 */
28public class FrameBodySIGN extends AbstractID3v2FrameBody {
29 
30    /**
31     * Creates a new FrameBodySIGN object.
32     */
33    public FrameBodySIGN() {
34        super();
35    }
36 
37    /**
38     * Creates a new FrameBodySIGN object.
39     */
40    public FrameBodySIGN(final FrameBodySIGN body) {
41        super(body);
42    }
43 
44    /**
45     * Creates a new FrameBodySIGN object.
46     */
47    public FrameBodySIGN(final byte groupSymbol, final byte[] signature) {
48        setObject("Group Symbol", new Byte(groupSymbol));
49        setObject("Signature", signature);
50    }
51 
52    /**
53     * Creates a new FrameBodySIGN object.
54     */
55    public FrameBodySIGN(final RandomAccessFile file) throws IOException, InvalidTagException {
56        this.read(file);
57    }
58 
59    public void setGroupSymbol(final byte groupSymbol) {
60        setObject("Group Symbol", new Byte(groupSymbol));
61    }
62 
63    public byte getGroupSymbol() {
64        if (getObject("Group Symbol") != null) {
65            return ((Byte) getObject("Group Symbol")).byteValue();
66        }
67        return 0;
68    }
69 
70    public String getIdentifier() {
71        return "SIGN" + ((char) 0) + getGroupSymbol() + ((char) 0) + (new String(getSignature()));
72    }
73 
74    public void setSignature(final byte[] signature) {
75        setObject("Signature", signature);
76    }
77 
78    public byte[] getSignature() {
79        return (byte[]) getObject("Signature");
80    }
81 
82    protected void setupObjectList() {
83        appendToObjectList(new ObjectNumberFixedLength("Group Symbol", 1));
84        appendToObjectList(new ObjectByteArraySizeTerminated("Signature"));
85    }
86}

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