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

Constructor Index

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

Method Index

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

Constructors

 o 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

Methods

 o getTitle
 public String getTitle() throws NoID3TagException
Read title from ID3 tag

Returns:
s Title
Throws: NoID3TagException
If file does not contain an ID3 tag
 o getArtist
 public String getArtist() throws NoID3TagException
Read artist from ID3 tag

Returns:
s Artist
Throws: NoID3TagException
If file does not contain an ID3 tag
 o getAlbum
 public String getAlbum() throws NoID3TagException
Read album from ID3 tag

Returns:
s album
Throws: NoID3TagException
If file does not contain an ID3 tag
 o getYear
 public String getYear() throws NoID3TagException
Read year from ID3 tag

Returns:
s Year
Throws: NoID3TagException
If file does not contain an ID3 tag
 o getGenre
 public int getGenre() throws NoID3TagException
Read genre from ID3 tag

Returns:
s Genre
Throws: NoID3TagException
If file does not contain an ID3 tag
 o getComment
 public String getComment() throws NoID3TagException
Read comment from ID3 tag

Returns:
s comment
Throws: NoID3TagException
If file does not contain an ID3 tag
 o 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
 o 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
 o setTitle
 public void setTitle(String title)
Set title

Parameters:
title - Title
 o setArtist
 public void setArtist(String artist)
Set artist

Parameters:
artist - Artist
 o setAlbum
 public void setAlbum(String album)
Set album

Parameters:
album - Album
 o setYear
 public void setYear(String year)
Set year

Parameters:
year - Year
 o setComment
 public void setComment(String comment)
Set comment

Parameters:
comment - Comment
 o 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
 o setGenre
 public void setGenre(int genre) throws ID3IllegalFormatException
Set genre

Parameters:
genre - Genre
Throws: ID3IllegalFormatException
if genre is negative or larger than 255
 o writeTag
 public void writeTag() throws IOException
Write information provided with setXXX to ID3 tag

 o 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