public class ID3v2Frame extends Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
compression |
private static int |
COMPRESSION_BIT |
protected byte[] |
data |
private static int |
DATA_LENGTH_INDICATOR_BIT |
protected static int |
DATA_LENGTH_OFFSET |
protected int |
dataLength |
private boolean |
dataLengthIndicator |
private boolean |
encryption |
private static int |
ENCRYPTION_BIT |
private static int |
FLAGS1_OFFSET |
private static int |
FLAGS2_OFFSET |
private boolean |
group |
private static int |
GROUP_BIT |
private static int |
HEADER_LENGTH |
protected String |
id |
private static int |
ID_LENGTH |
private static int |
ID_OFFSET |
private static int |
PRESERVE_FILE_BIT |
private static int |
PRESERVE_TAG_BIT |
private boolean |
preserveFile |
private boolean |
preserveTag |
private static int |
READ_ONLY_BIT |
private boolean |
readOnly |
private boolean |
unsynchronisation |
private static int |
UNSYNCHRONISATION_BIT |
| Constructor and Description |
|---|
ID3v2Frame(byte[] buffer,
int offset) |
ID3v2Frame(String id,
byte[] data) |
| Modifier and Type | Method and 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() |
private byte[] |
packFlags() |
void |
packFrame(byte[] bytes,
int offset) |
private void |
packHeader(byte[] bytes,
int i) |
protected void |
sanityCheckUnpackedHeader() |
void |
setData(byte[] data) |
byte[] |
toBytes() |
void |
toBytes(byte[] bytes,
int offset) |
protected void |
unpackDataLength(byte[] buffer,
int offset) |
private void |
unpackFlags(byte[] buffer,
int offset) |
protected void |
unpackFrame(byte[] buffer,
int offset) |
protected int |
unpackHeader(byte[] buffer,
int offset) |
private static final int HEADER_LENGTH
private static final int ID_OFFSET
private static final int ID_LENGTH
protected static final int DATA_LENGTH_OFFSET
private static final int FLAGS1_OFFSET
private static final int FLAGS2_OFFSET
private static final int PRESERVE_TAG_BIT
private static final int PRESERVE_FILE_BIT
private static final int READ_ONLY_BIT
private static final int GROUP_BIT
private static final int COMPRESSION_BIT
private static final int ENCRYPTION_BIT
private static final int UNSYNCHRONISATION_BIT
private static final int DATA_LENGTH_INDICATOR_BIT
protected String id
protected int dataLength
protected byte[] data
private boolean preserveTag
private boolean preserveFile
private boolean readOnly
private boolean group
private boolean compression
private boolean encryption
private boolean unsynchronisation
private boolean dataLengthIndicator
public ID3v2Frame(byte[] buffer,
int offset)
throws InvalidDataException
InvalidDataExceptionpublic ID3v2Frame(String id, byte[] data)
protected final void unpackFrame(byte[] buffer,
int offset)
throws InvalidDataException
InvalidDataExceptionprotected int unpackHeader(byte[] buffer,
int offset)
protected void unpackDataLength(byte[] buffer,
int offset)
private void unpackFlags(byte[] buffer,
int offset)
protected void sanityCheckUnpackedHeader()
throws InvalidDataException
InvalidDataExceptionpublic byte[] toBytes()
throws NotSupportedException
NotSupportedExceptionpublic void toBytes(byte[] bytes,
int offset)
throws NotSupportedException
NotSupportedExceptionpublic void packFrame(byte[] bytes,
int offset)
throws NotSupportedException
NotSupportedExceptionprivate void packHeader(byte[] bytes,
int i)
protected byte[] packDataLength()
private byte[] packFlags()
public String getId()
public int getDataLength()
public int getLength()
public byte[] getData()
public void setData(byte[] data)
public boolean hasDataLengthIndicator()
public boolean hasCompression()
public boolean hasEncryption()
public boolean hasGroup()
public boolean hasPreserveFile()
public boolean hasPreserveTag()
public boolean isReadOnly()
public boolean hasUnsynchronisation()