org.jaudiotagger.tag.id3
Class ID3v11Tag

java.lang.Object
  extended by org.jaudiotagger.tag.id3.AbstractTagItem
      extended by org.jaudiotagger.tag.id3.AbstractTag
          extended by org.jaudiotagger.tag.id3.AbstractID3Tag
              extended by org.jaudiotagger.tag.id3.AbstractID3v1Tag
                  extended by org.jaudiotagger.tag.id3.ID3v1Tag
                      extended by org.jaudiotagger.tag.id3.ID3v11Tag
All Implemented Interfaces:
Tag

public class ID3v11Tag
extends ID3v1Tag

Represents an ID3v11 tag.

Author:
: Eric Farng, : Paul Taylor

Field Summary
 
Fields inherited from class org.jaudiotagger.tag.id3.AbstractID3v1Tag
logger
 
Constructor Summary
ID3v11Tag()
          Creates a new ID3v11 datatype.
ID3v11Tag(AbstractTag mp3tag)
          Creates a new ID3v11 datatype from a non v11 tag
ID3v11Tag(ID3v11Tag copyObject)
           
ID3v11Tag(java.io.RandomAccessFile file)
          Deprecated. use ID3v11Tag(RandomAccessFile,String) instead
ID3v11Tag(java.io.RandomAccessFile file, java.lang.String loggingFilename)
          Creates a new ID3v1_1 datatype.
 
Method Summary
 void addTrack(java.lang.String track)
          Adds a track to the tag.
 void createStructure()
          Create strcutured representation of this item.
 boolean equals(java.lang.Object obj)
          Compares Object with this only returns true if both v1_1 tags with all fields set to same value
 java.lang.String getFirstComment()
          Get Comment
 java.lang.String getFirstTrack()
          Return the track number as a String.
 byte getMajorVersion()
          Retrieve the Major Version
 byte getRelease()
          Retrieve the Release
 byte getRevision()
          Retrieve the Revision
 java.util.List getTrack()
           
 void read(java.nio.ByteBuffer byteBuffer)
          Read in a tag from the ByteBuffer
 boolean seek(java.nio.ByteBuffer byteBuffer)
          Find identifer within byteBuffer to indicate that a v11 tag exists within the buffer
 void set(TagField field)
           
 void setComment(java.lang.String comment)
          Set Comment
 void setTrack(java.lang.String trackValue)
          Set the track, v11 stores track numbers in a single byte value so can only handle a simple number in the range 0-255.
 void write(java.io.RandomAccessFile file)
          Write this representation of tag to the file indicated
 
Methods inherited from class org.jaudiotagger.tag.id3.ID3v1Tag
add, addAlbum, addArtist, addComment, addGenre, addTitle, addYear, createTagField, deleteTagField, get, get, getAlbum, getArtist, getComment, getEncoding, getFieldCount, getFields, getFirst, getFirst, getFirstAlbum, getFirstArtist, getFirstField, getFirstGenre, getFirstTitle, getFirstYear, getGenre, getTitle, getYear, hasCommonFields, hasField, isEmpty, iterator, setAlbum, setArtist, setEncoding, setGenre, setTitle, setYear
 
Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3v1Tag
delete, getSize
 
Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3Tag
getIdentifier, toString
 
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagItem
isSubsetOf
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jaudiotagger.tag.Tag
toString
 

Constructor Detail

ID3v11Tag

public ID3v11Tag()
Creates a new ID3v11 datatype.


ID3v11Tag

public ID3v11Tag(ID3v11Tag copyObject)

ID3v11Tag

public ID3v11Tag(AbstractTag mp3tag)
Creates a new ID3v11 datatype from a non v11 tag

Parameters:
mp3tag -
Throws:
java.lang.UnsupportedOperationException

ID3v11Tag

public ID3v11Tag(java.io.RandomAccessFile file,
                 java.lang.String loggingFilename)
          throws TagNotFoundException,
                 java.io.IOException
Creates a new ID3v1_1 datatype.

Parameters:
file -
loggingFilename -
Throws:
TagNotFoundException
java.io.IOException

ID3v11Tag

public ID3v11Tag(java.io.RandomAccessFile file)
          throws TagNotFoundException,
                 java.io.IOException
Deprecated. use ID3v11Tag(RandomAccessFile,String) instead

Creates a new ID3v1_1 datatype.

Parameters:
file -
Throws:
TagNotFoundException
java.io.IOException
Method Detail

getRelease

public byte getRelease()
Retrieve the Release

Overrides:
getRelease in class ID3v1Tag

getMajorVersion

public byte getMajorVersion()
Retrieve the Major Version

Overrides:
getMajorVersion in class ID3v1Tag

getRevision

public byte getRevision()
Retrieve the Revision

Overrides:
getRevision in class ID3v1Tag

setComment

public void setComment(java.lang.String comment)
Set Comment

Specified by:
setComment in interface Tag
Overrides:
setComment in class ID3v1Tag
Parameters:
comment -

getFirstComment

public java.lang.String getFirstComment()
Get Comment

Specified by:
getFirstComment in interface Tag
Overrides:
getFirstComment in class ID3v1Tag
Returns:
comment

setTrack

public void setTrack(java.lang.String trackValue)
Set the track, v11 stores track numbers in a single byte value so can only handle a simple number in the range 0-255.

Specified by:
setTrack in interface Tag
Overrides:
setTrack in class ID3v1Tag
Parameters:
trackValue -

getFirstTrack

public java.lang.String getFirstTrack()
Return the track number as a String.

Specified by:
getFirstTrack in interface Tag
Overrides:
getFirstTrack in class ID3v1Tag
Returns:
track

addTrack

public void addTrack(java.lang.String track)
Description copied from interface: Tag
Adds a track to the tag.

Specified by:
addTrack in interface Tag
Overrides:
addTrack in class ID3v1Tag
Parameters:
track - Track

getTrack

public java.util.List getTrack()
Specified by:
getTrack in interface Tag
Overrides:
getTrack in class ID3v1Tag
Returns:

set

public void set(TagField field)
Specified by:
set in interface Tag
Overrides:
set in class ID3v1Tag

equals

public boolean equals(java.lang.Object obj)
Compares Object with this only returns true if both v1_1 tags with all fields set to same value

Overrides:
equals in class ID3v1Tag
Parameters:
obj - Comparing Object
Returns:

seek

public boolean seek(java.nio.ByteBuffer byteBuffer)
Find identifer within byteBuffer to indicate that a v11 tag exists within the buffer

Overrides:
seek in class ID3v1Tag
Parameters:
byteBuffer -
Returns:
true if find header for v11 tag within buffer

read

public void read(java.nio.ByteBuffer byteBuffer)
          throws TagNotFoundException
Read in a tag from the ByteBuffer

Overrides:
read in class ID3v1Tag
Parameters:
byteBuffer - from where to read in a tag
Throws:
TagNotFoundException - if unable to read a tag in the byteBuffer

write

public void write(java.io.RandomAccessFile file)
           throws java.io.IOException
Write this representation of tag to the file indicated

Overrides:
write in class ID3v1Tag
Parameters:
file - that this tag should be written to
Throws:
java.io.IOException - thrown if there were problems writing to the file

createStructure

public void createStructure()
Description copied from class: ID3v1Tag
Create strcutured representation of this item.

Overrides:
createStructure in class ID3v1Tag