|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object helliker.id3.ID3v2Header
Field Summary | |
private java.lang.String |
ENC_TYPE
|
private boolean |
experimental
|
private boolean |
extended
|
private boolean |
footer
|
private int |
HEAD_LOCATION
|
private int |
HEAD_SIZE
|
private boolean |
headerExists
|
private int |
majorVersion
|
private int |
minorVersion
|
private java.io.File |
mp3
|
private int |
NEW_MAJOR_VERSION
|
private int |
NEW_MINOR_VERSION
|
private java.lang.String |
TAG_START
|
private int |
tagSize
|
private boolean |
unsynchronisation
|
Constructor Summary | |
ID3v2Header(java.io.File mp3)
Create an id3v2header linked to the file passed as a parameter. |
Method Summary | |
private boolean |
checkHeader(java.io.RandomAccessFile raf)
Checks to see if there is an id3v2 header in the file provided to the constructor. |
byte[] |
getBytes()
Return an array of bytes representing the header. |
boolean |
getExperimental()
Returns true if the experimental bit of this header is set. |
boolean |
getExtendedHeader()
Returns true if this tag has an extended header. |
private byte |
getFlagByte()
A helper function for the getBytes function that returns a byte with the proper flags set. |
boolean |
getFooter()
Returns true if this tag has a footer. |
int |
getHeaderSize()
Returns the size (in bytes) of this header. |
int |
getMajorVersion()
Returns the major version of this id3v2 tag. |
int |
getMinorVersion()
Return the minor version/revision of this id3v2 tag. |
int |
getTagSize()
Returns the size (in bytes) of the frames and/or extended header portion of the id3v2 tag according to the size field in the header. |
boolean |
getUnsynchronisation()
Returns true if the unsynchronisation bit is set in this header. |
boolean |
headerExists()
Returns true if a header exists |
private void |
readHeader(java.io.RandomAccessFile raf)
Extracts the information from the header. |
void |
setExperimental(boolean experiment)
Set the value of the experimental bit of this header. |
void |
setExtendedHeader(boolean extend)
Set the value of the extended header bit of this header. |
void |
setFooter(boolean foot)
Sets the value of the footer bit for this header. |
void |
setTagSize(int size)
Sets the size of the frames and/or extended header. |
void |
setUnsynchronisation(boolean unsynch)
Set the unsynchronisation flag for this header. |
java.lang.String |
toString()
Return a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private final java.lang.String TAG_START
private final java.lang.String ENC_TYPE
private final int HEAD_SIZE
private final int HEAD_LOCATION
private final int NEW_MAJOR_VERSION
private final int NEW_MINOR_VERSION
private java.io.File mp3
private boolean headerExists
private int majorVersion
private int minorVersion
private boolean unsynchronisation
private boolean extended
private boolean experimental
private boolean footer
private int tagSize
Constructor Detail |
public ID3v2Header(java.io.File mp3) throws java.io.FileNotFoundException, java.io.IOException
mp3
- the file to attempt to read data from
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occursMethod Detail |
private boolean checkHeader(java.io.RandomAccessFile raf) throws java.io.FileNotFoundException, java.io.IOException
raf
- the open file to read from
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occursprivate void readHeader(java.io.RandomAccessFile raf) throws java.io.FileNotFoundException, java.io.IOException
raf
- the open file to read from
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occurspublic byte[] getBytes()
private byte getFlagByte()
public boolean headerExists()
public int getHeaderSize()
public int getTagSize()
public void setTagSize(int size)
size
- a value of type 'int'public int getMajorVersion()
public int getMinorVersion()
public boolean getUnsynchronisation()
public void setUnsynchronisation(boolean unsynch)
unsynch
- the new value of the unsynchronisation flagpublic boolean getExtendedHeader()
public void setExtendedHeader(boolean extend)
extend
- the new value of the extended header bitpublic boolean getExperimental()
public void setExperimental(boolean experiment)
experiment
- the new value of the experimental bitpublic boolean getFooter()
public void setFooter(boolean foot)
foot
- the new value of the footer bit for this headerpublic java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |