|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dusbabek.lib.id3.BasicTagHeader
public abstract class BasicTagHeader
This class represents the 10 bytes that are the basic header on any ID3v2 tag. For the uninitiated, that format is 'I' 'D' '3' 0x00-0x02 version 0x03 revision 0x04 flags 0x05 tag size 0x06-0x09 the tag size can be calculated by ignorning the first bit of each bit (hi) and converting the 28 bits that are left over into an integer.
Field Summary | |
---|---|
static int |
BASIC_TAG_HEADER_LEN
size of a basic tag header. |
Constructor Summary | |
---|---|
BasicTagHeader(byte[] tenBytes)
Constructor. |
Method Summary | |
---|---|
long |
getDataSize()
returns the size of the data (not including ANY headers). |
byte |
getFlags()
|
long |
getTagSize()
returned as long to avoid sign extension problems in java. |
byte |
getVersion()
|
void |
setDataSize(long l)
set the size of the data. |
protected void |
setTagSize(long l)
set the size of the tag. |
int |
sizeOf()
kind of moot. |
abstract boolean |
usesUnsynchronization()
|
void |
write(java.io.OutputStream out)
write this header to a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BASIC_TAG_HEADER_LEN
Constructor Detail |
---|
public BasicTagHeader(byte[] tenBytes) throws java.io.IOException
tenBytes
- byte[]
java.io.IOException
Method Detail |
---|
public byte getVersion()
getVersion
in interface TagHeader
public byte getFlags()
getFlags
in interface TagHeader
public long getTagSize()
getTagSize
in interface TagHeader
public int sizeOf()
sizeOf
in interface TagHeader
public long getDataSize()
getDataSize
in interface TagHeader
public void setDataSize(long l)
setDataSize
in interface TagHeader
l
- longprotected void setTagSize(long l)
l
- longpublic void write(java.io.OutputStream out) throws java.io.IOException
write
in interface TagHeader
out
- OutputStream
java.io.IOException
public abstract boolean usesUnsynchronization()
usesUnsynchronization
in interface TagHeader
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |