public class ID3v24FrameBodySignature extends ID3v24FrameBody
![]() |
![]() |
A signature frame body enables a group of frames, grouped with GRID frames, to be signed.
Although signatures can reside inside the group id registration frame,
it might be desirable to store the signature elsewhere, e.g. in watermarks.
| Field | Description | |
|---|---|---|
| 1. | id | a number from 0 - 255 which uniquely identifies the group. |
| 2. | signature | binary signature of the group. |
There may be more than one signature frame in in an ID3v2.4 tag, but no two may have the same group id.
buffer, dirty, frameTypenextNullTerminatorIndex, nullTerminatorIndex| Constructor and Description |
|---|
ID3v24FrameBodySignature()
The constructor is called when creating a new frame.
|
ID3v24FrameBodySignature(byte id,
byte[] signature)
This constructor is called when creating a new frame.
|
ID3v24FrameBodySignature(java.io.InputStream inputStream,
int frameBodySize)
This constructor is called when reading in an existing frame from an .mp3 file.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
getId()
gets the unique id of the group.
|
byte[] |
getSignature()
gets the binary signature of the group.
|
void |
parse()
parses the raw bytes of the frame body and stores the parsed values in the frame's fields.
|
void |
setBuffer()
If the frame body's values have been modified, then resize the raw binary buffer and store the new values there.
|
void |
setId(byte id)
sets the unique id of the group.
|
void |
setSignature(byte[] signature)
sets the binary signature of the group.
|
java.lang.String |
toString()
gets a string representation of the signature frame body.
|
getFrameType, getNextNullTerminator, getSize, isDirty, save, savegetNextNullTerminator, pricesToString, stringToBytesbytesToInt, bytesToInt, bytesToShort, bytesToShort, bytesToSynchsafeInt, bytesToSynchsafeShort, formateDate, hex, hex, hex, intToBytes, littleEndianBytesToInt, pad, shortToBytes, synchsafeIntToBytespublic ID3v24FrameBodySignature()
public ID3v24FrameBodySignature(byte id,
byte[] signature)
id - a number from 0 - 255 which uniquely identifies the group.signature - the binary signature of the group.public ID3v24FrameBodySignature(java.io.InputStream inputStream,
int frameBodySize)
throws java.io.IOException
inputStream - input stream pointing to a signature frame body in the .mp3 file.frameBodySize - size (in bytes) of the frame's body.java.io.IOException - if there is an error while reading the frame body.public void parse()
throws java.lang.IllegalArgumentException
parse in class ID3v24FrameBodyjava.lang.IllegalArgumentException - if an invalid value is detected while parsing the frame body's raw bytes.public byte getId()
setId(byte)public void setId(byte id)
id - a number from 0 - 255 which uniquely identifies the groupgetId()public byte[] getSignature()
setSignature(byte[])public void setSignature(byte[] signature)
signature - the binary signature of the group.getSignature()public void setBuffer()
setBuffer in class ID3v24FrameBodypublic java.lang.String toString()
toString in class java.lang.Object