public class ID3v24FrameBodyLinkedInformation extends ID3v24FrameBody
A linked information frame body is associated with an ID3v2.4 LINK
frame
which is used to link information from another ID3v2.4 tag
that might reside in another audio file or alone in a binary file.
The linked information frame body contains the following fields:
Field | Description | |
---|---|---|
1. | linkedFrameType | type of ID3v2.4 frame being linked. |
2. | url | reference to the file where the frame is given. |
3. | additionalIdData | this optional field is used to help locate a specific frame in another file when the frame type alone is not sufficient to uniquely identify it. For example, an ID3v2.4 tag may contain several images, such as the
CD front cover , CD back cover , image of a live performance , etc.
Thus, the attached picture frame type alone is not enough to uniquely identify a single, specific frame.
The frames
The
The
The
The
|
There may be more than one linked information frame, but only one with the same contents.
buffer, dirty, frameType
nextNullTerminatorIndex, nullTerminatorIndex
Constructor and Description |
---|
ID3v24FrameBodyLinkedInformation()
The default constructor is called when creating a new frame.
|
ID3v24FrameBodyLinkedInformation(FrameType linkedFrameType,
java.lang.String url,
byte[] additionalIdData)
This constructor is called when creating a new frame.
|
ID3v24FrameBodyLinkedInformation(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[] |
getAdditionalIdData()
gets the additional id data which is used to help locate a specific frame in another file when the frame type alone is not sufficient to uniquely identify it.
|
FrameType |
getLinkedFrameType()
gets the type of ID3v2.4 frame that is linked.
|
java.lang.String |
getURL()
gets the url which holds a reference to the file which contains the linked frame.
|
void |
parse()
parses the raw bytes of the frame body and stores the parsed values in the frame's fields.
|
void |
setAdditionalIdData(byte[] additionalIdData)
sets the additional id data which is used to help locate a specific frame in another file when the frame type alone is not sufficient to uniquely identify it.
|
void |
setBuffer()
If the frame body's values have been modified, then resize the raw binary buffer and store the new values there.
|
void |
setLinkedFrameType(FrameType linkedFrameType)
sets the type of ID3v2.4 frame that is linked.
|
void |
setURL(java.lang.String url)
sets the url which holds a reference to the file which contains the linked frame.
|
java.lang.String |
toString()
gets a string representation of the linked information 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 ID3v24FrameBodyLinkedInformation()
attached picture
frame typepublic ID3v24FrameBodyLinkedInformation(FrameType linkedFrameType, java.lang.String url, byte[] additionalIdData)
linkedFrameType
- the type of ID3v2.4 linked frame.url
- the url which holds a reference to the file which contains the linked frame.additionalIdData
- the extra data which together with the frame type uniquely identifies a single frame in another file.public ID3v24FrameBodyLinkedInformation(java.io.InputStream inputStream, int frameBodySize) throws java.io.IOException
inputStream
- input stream pointing to a linked information 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 FrameType getLinkedFrameType()
setLinkedFrameType(FrameType)
public void setLinkedFrameType(FrameType linkedFrameType)
linkedFrameType
- the type of ID3v2.4 frame that is linked.ID3v24FrameBody.getFrameType()
public java.lang.String getURL()
setURL(String)
public void setURL(java.lang.String url)
url
- the url which holds a reference to the file which contains the linked frame.getURL()
public byte[] getAdditionalIdData()
setAdditionalIdData(byte[])
public void setAdditionalIdData(byte[] additionalIdData)
additionalIdData
- the extra data which together with the frame type uniquely identifies a single frame in another file.getAdditionalIdData()
public void setBuffer()
setBuffer
in class ID3v24FrameBody
public java.lang.String toString()
toString
in class java.lang.Object