public class ID3v23FrameBodyUniqueFileIdentifier extends ID3v23FrameBody
A unique file identifier frame body is associated with an ID3v2.3 UFID
frame
which is used to identify the audio file in a
database that may contain more information relevant to the content, such as CDDB. This is very similar to the music CD identifier
frame.
The ownerId URL should not be used for the actual database queries. The string "http://www.id3.org/dummy/ufid.html" should be used for tests. Software that isn't told otherwise
may safely remove such frames. The unique file identifier 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 database implementation. Questions regarding the database should be sent to the e-mail address specified. |
2. | data | the actual identifier, which may be up to 64 bytes. |
There may be more than one unique file identifier frame in an ID3v2.3 tag
, but only one with the same owner id field.
buffer, dirty, frameType
nextNullTerminatorIndex, nullTerminatorIndex
Constructor and Description |
---|
ID3v23FrameBodyUniqueFileIdentifier()
The default constructor is called when creating a new frame.
|
ID3v23FrameBodyUniqueFileIdentifier(java.io.InputStream inputStream,
int frameBodySize)
This constructor is called when reading in an existing frame from an .mp3 file.
|
ID3v23FrameBodyUniqueFileIdentifier(java.lang.String ownerId,
byte[] data)
This constructor is called when creating a new frame.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
gets the actual .mp3 file identifier to the audio file database.
|
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 actual .mp3 file identifier to the audio file database.
|
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 unique field identifier 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 ID3v23FrameBodyUniqueFileIdentifier()
public ID3v23FrameBodyUniqueFileIdentifier(java.lang.String ownerId, byte[] data)
ownerId
- id of the owner of the private data.data
- raw binary datapublic ID3v23FrameBodyUniqueFileIdentifier(java.io.InputStream inputStream, int frameBodySize) throws java.io.IOException
inputStream
- input stream pointing to a unique file identifier 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 ID3v23FrameBody
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[] getData()
setData(byte[])
public void setData(byte[] data) throws java.lang.IllegalArgumentException
data
- the binary data of the audio database identifier.java.lang.IllegalArgumentException
- if the length of the data is greater than 64.getData()
public void setBuffer()
setBuffer
in class ID3v23FrameBody
public java.lang.String toString()
toString
in class java.lang.Object