|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.blinkenlights.jid3.ID3Tag
org.blinkenlights.jid3.v2.ID3V2Tag
Field Summary | |
protected boolean |
m_bCRCDataFlag
Flag indicating whether a CRC value exists in the extended header. |
protected boolean |
m_bExperimentalFlag
Flag indicating this tag should be considered experimental. |
protected boolean |
m_bExtendedHeaderFlag
Flag indicating whether the extended header is present or not. |
protected boolean |
m_bUnsynchronizationUsedFlag
Flag indicating whether unsynchronization is used in this tag or not. |
protected int |
m_iPaddingLength
Value specifying the amount of padding which is appended to the frames in this tag. |
protected java.util.Map |
m_oFrameIdToFrameMap
Mapping from frame ID to list containing frames. |
Constructor Summary | |
ID3V2Tag(boolean bUnsynchronizationUsedFlag,
boolean bExtendedHeaderFlag,
boolean bExperimentalFlag)
Construct an ID3 V2 tag, specifying flag values. |
Method Summary | |
abstract boolean |
containsAtLeastOneFrame()
Check if this tag contains at least one frame. |
abstract java.lang.String |
getAlbum()
Convenience method for retrieving album title directly from tag. |
abstract java.lang.String |
getArtist()
Convenience method for retrieving artist directly from tag. |
abstract java.lang.String |
getComment()
Convenience method for retrieving the comment directly from tag. |
boolean |
getCRC()
Get the current CRC status for the extended header in this frame. |
static int |
getDefaultPaddingLength()
Get the default padding length currently set for newly created tags. |
boolean |
getExtendedHeader()
Get the current extended header status for this tag. |
abstract java.lang.String |
getGenre()
Convenience method for retrieving the genre directly from tag. |
int |
getPaddingLength()
Get the padding length currently set for this tag. |
ID3V2Frame[] |
getSingleFrames()
Get all frames set in this tag which can only be stored once in the tag. |
abstract java.lang.String |
getTitle()
Convenience method for retrieving song title directly from tag. |
abstract int |
getTotalTracks()
Convenience method for retrieving total number of tracks directly from tag. |
abstract int |
getTrackNumber()
Convenience method for retrieving track number directly from tag. |
boolean |
getUnsynchronization()
Get the current unsynchronization status for this tag. |
abstract int |
getYear()
Convenience method for retrieving year directly from tag. |
static ID3V2Tag |
read(java.io.InputStream oIS)
Read a tag from an input stream. |
abstract void |
sanityCheck()
|
abstract void |
setAlbum(java.lang.String sAlbum)
Convenience method for setting album title directly from tag. |
abstract void |
setArtist(java.lang.String sArtist)
Convenience method for setting artist directly from tag. |
abstract void |
setComment(java.lang.String sComment)
Convenience method for setting comment directly from tag. |
void |
setCRC(boolean bCRCUsed)
Set the CRC flag (extended header must be enabled before this flag can be set. |
static void |
setDefaultPaddingLength(int iPaddingLength)
Set the default padding length to be added at the end of newly created tags. |
void |
setExtendedHeader(boolean bExtendedHeaderUsed)
Set the extended header flag for this tag. |
abstract void |
setGenre(java.lang.String sGenre)
Convenience method for setting genre directly from tag. |
void |
setPaddingLength(int iPaddingLength)
Set the padding length to be added at the end of this tag. |
abstract void |
setTitle(java.lang.String sTitle)
Convenience method for setting song title directly from tag. |
abstract void |
setTrackNumber(int iTrackNumber)
Convenience method for setting track number directly from tag. |
abstract void |
setTrackNumber(int iTrackNumber,
int iTotalTracks)
Convenience method for setting track number and total number of tracks directly from tag. |
void |
setUnsynchronization(boolean bUnsynchronizationUsed)
Set the unsynchronization status. |
abstract void |
setYear(int iYear)
Convenience method for setting year directly from tag. |
java.lang.String |
toString()
Represent a tag as string for debugging purposes. |
abstract void |
write(java.io.OutputStream oOS)
Write this tag to an output stream. |
Methods inherited from class org.blinkenlights.jid3.ID3Tag |
useStrict, usingStrict |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.blinkenlights.jid3.util.ID3Visitable |
accept |
Field Detail |
protected boolean m_bUnsynchronizationUsedFlag
protected boolean m_bExtendedHeaderFlag
protected boolean m_bExperimentalFlag
protected boolean m_bCRCDataFlag
protected java.util.Map m_oFrameIdToFrameMap
protected int m_iPaddingLength
Constructor Detail |
public ID3V2Tag(boolean bUnsynchronizationUsedFlag, boolean bExtendedHeaderFlag, boolean bExperimentalFlag)
bUnsynchronizationUsedFlag
- specify whether unsynchronization is to be used in this tag or notbExtendedHeaderFlag
- specify whether the extended header will be present or notbExperimentalFlag
- specify whether this tag is to be considered experimental or notMethod Detail |
public ID3V2Frame[] getSingleFrames()
public abstract boolean containsAtLeastOneFrame()
public abstract void sanityCheck() throws ID3Exception
ID3Exception
public abstract void write(java.io.OutputStream oOS) throws ID3Exception
oOS
- the output stream to which this tag is to be written
ID3Exception
- if an error occurs while writingpublic java.lang.String toString()
ID3Tag
toString
in class ID3Tag
public static ID3V2Tag read(java.io.InputStream oIS) throws ID3Exception
oIS
- the input stream from which to read a tag
ID3Exception
- if an error occurs while reading the tagpublic void setUnsynchronization(boolean bUnsynchronizationUsed)
bUnsynchronizationUsed
- an indication of whether unsynchronization should be used when writing this tagpublic boolean getUnsynchronization()
public void setExtendedHeader(boolean bExtendedHeaderUsed)
bExtendedHeaderUsed
- an indication of whether the extended header should be included in this tagpublic boolean getExtendedHeader()
public void setCRC(boolean bCRCUsed) throws ID3Exception
bCRCUsed
- an indication of whether a CRC value should be included in the extended header of this tag
ID3Exception
public boolean getCRC()
public static void setDefaultPaddingLength(int iPaddingLength) throws ID3Exception
iPaddingLength
- the padding length to use
ID3Exception
- if the padding length value is negativepublic void setPaddingLength(int iPaddingLength) throws ID3Exception
iPaddingLength
- the padding length to use
ID3Exception
- if the padding length value is negativepublic static int getDefaultPaddingLength()
public int getPaddingLength()
public abstract void setArtist(java.lang.String sArtist) throws ID3Exception
sArtist
- the artist name
ID3Exception
public abstract java.lang.String getArtist()
ID3Exception
public abstract void setTitle(java.lang.String sTitle) throws ID3Exception
sTitle
- the song title
ID3Exception
public abstract java.lang.String getTitle()
ID3Exception
public abstract void setAlbum(java.lang.String sAlbum) throws ID3Exception
sAlbum
- the album title
ID3Exception
public abstract java.lang.String getAlbum()
ID3Exception
public abstract void setYear(int iYear) throws ID3Exception
ID3Exception
public abstract int getYear() throws ID3Exception
ID3Exception
- if no year was setpublic abstract void setTrackNumber(int iTrackNumber) throws ID3Exception
iTrackNumber
- the track number
ID3Exception
public abstract void setTrackNumber(int iTrackNumber, int iTotalTracks) throws ID3Exception
iTrackNumber
- the track numberiTotalTracks
- the total number of tracks
ID3Exception
public abstract int getTrackNumber() throws ID3Exception
ID3Exception
- if not track number was setpublic abstract int getTotalTracks() throws ID3Exception
ID3Exception
- if total number of tracks was not setpublic abstract void setGenre(java.lang.String sGenre) throws ID3Exception
sGenre
- the genre (free-form)
ID3Exception
public abstract java.lang.String getGenre()
ID3Exception
public abstract void setComment(java.lang.String sComment) throws ID3Exception
sComment
- the comment
ID3Exception
public abstract java.lang.String getComment()
ID3Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |