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[]
data
protected static int
DATA_LENGTH_OFFSET
protected int
dataLength
protected String
id
-
Constructor Summary
Constructors Constructor Description ID3v2Frame(byte[] buffer, int offset)
ID3v2Frame(String id, byte[] data)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
byte[]
getData()
int
getDataLength()
String
getId()
int
getLength()
boolean
hasCompression()
boolean
hasDataLengthIndicator()
boolean
hasEncryption()
boolean
hasGroup()
int
hashCode()
boolean
hasPreserveFile()
boolean
hasPreserveTag()
boolean
hasUnsynchronisation()
boolean
isReadOnly()
protected byte[]
packDataLength()
void
packFrame(byte[] bytes, int offset)
protected void
sanityCheckUnpackedHeader()
void
setData(byte[] data)
byte[]
toBytes()
void
toBytes(byte[] bytes, int offset)
protected void
unpackDataLength(byte[] buffer, int offset)
protected void
unpackFrame(byte[] buffer, int offset)
protected int
unpackHeader(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
-