org.blinkenlights.jid3
Class MP3File

java.lang.Object
  extended byorg.blinkenlights.jid3.MediaFile
      extended byorg.blinkenlights.jid3.MP3File

public class MP3File
extends MediaFile


Field Summary
 
Fields inherited from class org.blinkenlights.jid3.MediaFile
m_oFileSource, m_oID3V1Tag, m_oID3V2Tag
 
Constructor Summary
MP3File(java.io.File oSourceFile)
          Construct an object representing the MP3 file specified.
MP3File(IFileSource oFileSource)
           
 
Method Summary
 ID3V1Tag getID3V1Tag()
          Get the ID3 V1 tag from this file.
 ID3V2Tag getID3V2Tag()
          Get the ID3 V2 tag from this file.
 ID3Tag[] getTags()
          Get any tags stored in the file.
 void removeID3V1Tag()
          Remove V1 tags from this file if present.
 void removeID3V2Tag()
          Remove V2 tags from this file if present.
 void removeTags()
          Remove both V1 and V2 tags from this file if present.
 void sync()
          Update the actual file to reflect the current state of the tags as set in this object.
 
Methods inherited from class org.blinkenlights.jid3.MediaFile
setID3Tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MP3File

public MP3File(java.io.File oSourceFile)
Construct an object representing the MP3 file specified.

Parameters:
oSourceFile - a File pointing to the source MP3 file

MP3File

public MP3File(IFileSource oFileSource)
Method Detail

sync

public void sync()
          throws ID3Exception
Description copied from class: MediaFile
Update the actual file to reflect the current state of the tags as set in this object.

Specified by:
sync in class MediaFile
Throws:
ID3Exception - if an error occurs updating the file

getTags

public ID3Tag[] getTags()
                 throws ID3Exception
Description copied from class: MediaFile
Get any tags stored in the file.

Specified by:
getTags in class MediaFile
Returns:
an array of tags which are contained in the file
Throws:
ID3Exception - if there is any error reading the file

getID3V1Tag

public ID3V1Tag getID3V1Tag()
                     throws ID3Exception
Description copied from class: MediaFile
Get the ID3 V1 tag from this file.

Specified by:
getID3V1Tag in class MediaFile
Returns:
a V1 tag object, if V1 tags are contained in the file
Throws:
ID3Exception - if there is an error reading the file

getID3V2Tag

public ID3V2Tag getID3V2Tag()
                     throws ID3Exception
Description copied from class: MediaFile
Get the ID3 V2 tag from this file.

Specified by:
getID3V2Tag in class MediaFile
Returns:
a V2 tag object, if V2 tags are contained in the file
Throws:
ID3Exception - if there is an error reading the file

removeTags

public void removeTags()
                throws ID3Exception
Description copied from class: MediaFile
Remove both V1 and V2 tags from this file if present.

Specified by:
removeTags in class MediaFile
Throws:
ID3Exception - if there is an error processing the file

removeID3V1Tag

public void removeID3V1Tag()
                    throws ID3Exception
Description copied from class: MediaFile
Remove V1 tags from this file if present.

Specified by:
removeID3V1Tag in class MediaFile
Throws:
ID3Exception - if there is an error processing the file

removeID3V2Tag

public void removeID3V2Tag()
                    throws ID3Exception
Description copied from class: MediaFile
Remove V2 tags from this file if present.

Specified by:
removeID3V2Tag in class MediaFile
Throws:
ID3Exception - if there is an error processing the file