    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class de.vdheide.mp3.ID3

    java.lang.Object
       |
       +----de.vdheide.mp3.ID3

public class ID3
extends Object

##

ID3(File)
  Create a new ID3 tag which is based on mp3_file

##

checkForTag()
  Check if ID3 tag is present
getAlbum()
  Read album from ID3 tag
getArtist()
  Read artist from ID3 tag
getComment()
  Read comment from ID3 tag
getGenre()
  Read genre from ID3 tag
getTitle()
  Read title from ID3 tag
getTrack()
  Read track number from ID3 tag
getYear()
  Read year from ID3 tag
readTag()
  Read ID3 tag and prepare for retrieval with getXXX Use this method to reread tag if changed externally
setAlbum(String)
  Set album
setArtist(String)
  Set artist
setComment(String)
  Set comment
setGenre(int)
  Set genre
setTitle(String)
  Set title
setTrack(int)
  Set track number
setYear(String)
  Set year
writeTag()
  Write information provided with setXXX to ID3 tag

##

ID3

     public ID3(File mp3_file)

  Create a new ID3 tag which is based on mp3_file

  Parameters:
    mp3_file - MP3 file to read ID3 tag to / write ID3 tag to

##

getTitle

     public String getTitle() throws NoID3TagException

  Read title from ID3 tag

  Returns:
    s Title
  Throws: NoID3TagException
    If file does not contain an ID3 tag

getArtist

     public String getArtist() throws NoID3TagException

  Read artist from ID3 tag

  Returns:
    s Artist
  Throws: NoID3TagException
    If file does not contain an ID3 tag

getAlbum

     public String getAlbum() throws NoID3TagException

  Read album from ID3 tag

  Returns:
    s album
  Throws: NoID3TagException
    If file does not contain an ID3 tag

getYear

     public String getYear() throws NoID3TagException

  Read year from ID3 tag

  Returns:
    s Year
  Throws: NoID3TagException
    If file does not contain an ID3 tag

getGenre

     public int getGenre() throws NoID3TagException

  Read genre from ID3 tag

  Returns:
    s Genre
  Throws: NoID3TagException
    If file does not contain an ID3 tag

getComment

     public String getComment() throws NoID3TagException

  Read comment from ID3 tag

  Returns:
    s comment
  Throws: NoID3TagException
    If file does not contain an ID3 tag

getTrack

     public int getTrack() throws NoID3TagException

  Read track number from ID3 tag

  Returns:
    s Track number
  Throws: NoID3TagException
    If file does not contain an ID3 tag

readTag

     public void readTag() throws NoID3TagException, IOException

  Read ID3 tag and prepare for retrieval with getXXX Use this method to reread tag if changed externally

  Throws: NoID3TagException
    If file does not contain an ID3 tag
  Throws: IOException
    If I/O error occurs

setTitle

     public void setTitle(String title)

  Set title

  Parameters:
    title - Title

setArtist

     public void setArtist(String artist)

  Set artist

  Parameters:
    artist - Artist

setAlbum

     public void setAlbum(String album)

  Set album

  Parameters:
    album - Album

setYear

     public void setYear(String year)

  Set year

  Parameters:
    year - Year

setComment

     public void setComment(String comment)

  Set comment

  Parameters:
    comment - Comment

setTrack

     public void setTrack(int track) throws ID3IllegalFormatException

  Set track number

  Parameters:
    track - Track number
  Throws: ID3IllegalFormatException
    if track is negative or larger than 255

setGenre

     public void setGenre(int genre) throws ID3IllegalFormatException

  Set genre

  Parameters:
    genre - Genre
  Throws: ID3IllegalFormatException
    if genre is negative or larger than 255

writeTag

     public void writeTag() throws IOException

  Write information provided with setXXX to ID3 tag

checkForTag

     public boolean checkForTag() throws IOException

  Check if ID3 tag is present

  Returns:
    s true if tag present

    All Packages  Class Hierarchy  This Package  Previous  Next  Index