public class ID3v24FrameBodyGroupIdentificationRegistration extends ID3v24FrameBody
An group identification registration frame body is associated with an ID3v2.4 GRID
frame
which is used to group otherwise unrelated frames.
To identify which frames belongs to a set of frames, a group identifier must be registered in the tag with this frame. The group identification registration frame body contains the
following fields:
Field | Description | |
---|---|---|
1. | ownerId | URL containing an e-mail address, or a link to a location where an e-mail address can be found, that belongs to the organization responsible for this specific encrypted audio file. Questions regarding the grouping should be sent to the indicated e-mail address. |
2. | groupSymbol | id which uniquely identifies a group and with which all associated frames will references. Values below 0x80 are reserved. |
4. | data | This optional field contains group specific data, such as a digital signature. If not used, it will contain a byte array of length 0. |
There may be more than one group identification registration frame in an ID3v2.4 tag
, but only one containing the same
owner and only one containing the same group symbol. The group symbol must be used somewhere in another frame in the tag.
buffer, dirty, frameType
nextNullTerminatorIndex, nullTerminatorIndex
Constructor and Description |
---|
ID3v24FrameBodyGroupIdentificationRegistration()
The default constructor is called when creating a new frame.
|
ID3v24FrameBodyGroupIdentificationRegistration(java.io.InputStream inputStream,
int frameBodySize)
This constructor is called when reading in an existing frame from an .mp3 file.
|
ID3v24FrameBodyGroupIdentificationRegistration(java.lang.String ownerId,
byte groupSymbol,
byte[] data)
This constructor is called when creating a new frame.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
gets the group specific data, such as a digital signature.
|
byte |
getGroupSymbol()
gets the group symbol.
|
java.lang.String |
getOwnerId()
gets the owner id of the frame.
|
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 |
setData(byte[] data)
sets the group specific data.
|
void |
setGroupSymbol(byte groupSymbol)
sets the group symbol.
|
void |
setOwnerId(java.lang.String ownerId)
sets the owner id, which is a URL containing an e-mail address, or a link to a location where an e-mail address can be found, that belongs to the
organization responsible for the frame.
|
java.lang.String |
toString()
gets a string representation of the group identification registration frame body showing all of the frame's fields and their values.
|
getFrameType, getNextNullTerminator, getSize, isDirty, save, save
getNextNullTerminator, pricesToString, stringToBytes
bytesToInt, bytesToInt, bytesToShort, bytesToShort, bytesToSynchsafeInt, bytesToSynchsafeShort, formateDate, hex, hex, hex, intToBytes, littleEndianBytesToInt, pad, shortToBytes, synchsafeIntToBytes
public ID3v24FrameBodyGroupIdentificationRegistration()
public ID3v24FrameBodyGroupIdentificationRegistration(java.lang.String ownerId, byte groupSymbol, byte[] data)
ownerId
- e-mail address, or a link to a location where an e-mail address can be found, that belongs to the organization responsible for this grouping.groupSymbol
- id of the group.data
- group specific data, such as a digital signature. this field is optional and may be empty.public ID3v24FrameBodyGroupIdentificationRegistration(java.io.InputStream inputStream, int frameBodySize) throws java.io.IOException
inputStream
- input stream pointing to a group identification registration 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 ID3v24FrameBody
java.lang.IllegalArgumentException
- if an invalid value is detected while parsing the frame body's raw bytes.public java.lang.String getOwnerId()
setOwnerId(String)
public void setOwnerId(java.lang.String ownerId)
ownerId
- the id of the owner of the data.getOwnerId()
public byte getGroupSymbol()
setGroupSymbol(byte)
public void setGroupSymbol(byte groupSymbol)
groupSymbol
- the group symbol.getGroupSymbol()
public byte[] getData()
setData(byte[])
public void setData(byte[] data)
data
- the group specific data.getData()
public void setBuffer()
setBuffer
in class ID3v24FrameBody
public java.lang.String toString()
toString
in class java.lang.Object