Package com.mpatric.mp3agic
Class ID3v2Frame
java.lang.Object
com.mpatric.mp3agic.ID3v2Frame
- Direct Known Subclasses:
ID3v24Frame,ID3v2ObseleteFrame
public class ID3v2Frame extends Object
-
Field Summary
Fields Modifier and Type Field Description protected byte[]dataprotected static intDATA_LENGTH_OFFSETprotected intdataLengthprotected Stringid -
Constructor Summary
Constructors Constructor Description ID3v2Frame(byte[] buffer, int offset)ID3v2Frame(String id, byte[] data) -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)byte[]getData()intgetDataLength()StringgetId()intgetLength()booleanhasCompression()booleanhasDataLengthIndicator()booleanhasEncryption()booleanhasGroup()inthashCode()booleanhasPreserveFile()booleanhasPreserveTag()booleanhasUnsynchronisation()booleanisReadOnly()protected byte[]packDataLength()voidpackFrame(byte[] bytes, int offset)protected voidsanityCheckUnpackedHeader()voidsetData(byte[] data)byte[]toBytes()voidtoBytes(byte[] bytes, int offset)protected voidunpackDataLength(byte[] buffer, int offset)protected voidunpackFrame(byte[] buffer, int offset)protected intunpackHeader(byte[] buffer, int offset)
-
Field Details
-
DATA_LENGTH_OFFSET
protected static final int DATA_LENGTH_OFFSET- See Also:
- Constant Field Values
-
id
-
dataLength
protected int dataLength -
data
protected byte[] data
-
-
Constructor Details
-
ID3v2Frame
- Throws:
InvalidDataException
-
ID3v2Frame
-
-
Method Details
-
unpackFrame
- Throws:
InvalidDataException
-
unpackHeader
protected int unpackHeader(byte[] buffer, int offset) -
unpackDataLength
protected void unpackDataLength(byte[] buffer, int offset) -
sanityCheckUnpackedHeader
- Throws:
InvalidDataException
-
toBytes
- Throws:
NotSupportedException
-
toBytes
- Throws:
NotSupportedException
-
packFrame
- Throws:
NotSupportedException
-
packDataLength
protected byte[] packDataLength() -
getId
-
getDataLength
public int getDataLength() -
getLength
public int getLength() -
getData
public byte[] getData() -
setData
public void setData(byte[] data) -
hasDataLengthIndicator
public boolean hasDataLengthIndicator() -
hasCompression
public boolean hasCompression() -
hasEncryption
public boolean hasEncryption() -
hasGroup
public boolean hasGroup() -
hasPreserveFile
public boolean hasPreserveFile() -
hasPreserveTag
public boolean hasPreserveTag() -
isReadOnly
public boolean isReadOnly() -
hasUnsynchronisation
public boolean hasUnsynchronisation() -
hashCode
public int hashCode() -
equals
-