|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.vdheide.mp3.ID3v2Header
This class contains an ID3v2 header
| Constructor Summary | |
ID3v2Header()
Create a new (empty) header |
|
ID3v2Header(byte version,
byte revision,
boolean unsynch,
boolean extended_header,
boolean experimental,
int length)
Build a ID3v2 header |
|
ID3v2Header(java.io.InputStream in)
Creates an ID3v2 header from an input stream. |
|
| Method Summary | |
byte[] |
getBytes()
Convert header to array of bytes |
boolean |
getExperimental()
|
int |
getTagSize()
Get length of tag |
boolean |
getUnsynchronization()
|
boolean |
hasExtendedHeader()
|
static boolean |
isHeader(byte[] head)
Checks if bytes contain a correct header |
void |
readFromFile(java.io.InputStream in)
Reads header from stream in Header must start at file
position. |
void |
setExperimental(boolean act)
Set / unset experimental |
void |
setExtendedHeader(boolean act)
Set / unset extended header present |
void |
setTagSize(int size)
Set length of tag |
void |
setUnsynchronization(boolean act)
Set / unset unsynchronization bit |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ID3v2Header()
public ID3v2Header(byte version,
byte revision,
boolean unsynch,
boolean extended_header,
boolean experimental,
int length)
version - ID3v2 versionrevision - ID3v2 revisionunsynch - Use unsynchronization scheme?extended_header - Use extended header?experimental - Is experimental?length - ID3v2 tag length
public ID3v2Header(java.io.InputStream in)
throws ID3v2IllegalVersionException,
NoID3v2HeaderException,
java.io.IOException
in - Stream to read from
ID3v2IllegalVersionException - If tag has a revision higher than
ID3v2.VERSION.ID3v2.REVISION
NoID3v2HeaderException - If file does not contain an ID3v2 header
java.io.IOException - If an I/O error occurs| Method Detail |
public void readFromFile(java.io.InputStream in)
throws ID3v2IllegalVersionException,
NoID3v2HeaderException,
java.io.IOException
in Header must start at file
position.
in - Stream to read from
ID3v2IllegalVersionException - If tag has a revision higher than
ID3v2.VERSION.ID3v2.REVISION
NoID3v2HeaderException - If file does not contain an ID3v2 header
java.io.IOException - If an I/O error occurspublic static boolean isHeader(byte[] head)
head - Array of bytes to be checked
public boolean getUnsynchronization()
public void setUnsynchronization(boolean act)
act - True: Set unsynchronization bitpublic boolean hasExtendedHeader()
public void setExtendedHeader(boolean act)
act - True: Set extended header present bitpublic boolean getExperimental()
public void setExperimental(boolean act)
act - True: Set experimental bitpublic int getTagSize()
public void setTagSize(int size)
size - Size to setpublic byte[] getBytes()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||