|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.metasyntactic.id3.v1.Tag
What is ID3 (v1)? The audio format MPEG layer I, layer II and layer III (MP3) has no native way of saving information about the contents, except for some simple yes/no parameters like "private", "copyrighted" and "original home" (meaning this is the original file and not a copy). A solution to this problem was introduced with the program "Studio3" by Eric Kemp alias NamkraD in 1996. By adding a small chunk of extra data in the end of the file one could get the MP3 file to carry information about the audio and not just the audio itself.
The placement of the tag, as the data was called, was probably chosen as there were little chance that it should disturb decoders. In order to make it easy to detect a fixed size of 128 bytes was chosen. The tag has the following layout (as hinted by the scheme to the right):
This class supports making tags, weading and writing them to streams, and adding them and removing them from files
Constructor Summary | |
Tag()
Creates a default (empty) tag |
|
Tag(java.lang.String title,
java.lang.String artist,
java.lang.String album,
int year,
java.lang.String comment,
byte track,
byte genre)
Creates new Tag |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
boolean |
equals(Tag t)
|
java.lang.String |
getAlbum()
|
java.lang.String |
getArtist()
|
java.lang.String |
getComment()
|
byte |
getGenre()
|
java.lang.String |
getTitle()
|
int |
getTrack()
|
int |
getYear()
|
int |
hashCode()
|
static void |
main(java.lang.String[] args)
|
static Tag |
read(java.io.InputStream in)
Tries to read an ID3 Tag starting at the current pointer of the input stream. |
void |
setAlbum(java.lang.String str)
|
void |
setArtist(java.lang.String str)
|
void |
setComment(java.lang.String str)
|
void |
setGenre(byte genre)
|
void |
setTitle(java.lang.String str)
|
void |
setTrack(byte track)
|
void |
setYear(int year)
|
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Tag(java.lang.String title, java.lang.String artist, java.lang.String album, int year, java.lang.String comment, byte track, byte genre)
public Tag()
Method Detail |
public java.lang.String getTitle()
public java.lang.String getArtist()
public java.lang.String getAlbum()
public java.lang.String getComment()
public int getTrack()
public int getYear()
public byte getGenre()
public void setTitle(java.lang.String str)
public void setArtist(java.lang.String str)
public void setAlbum(java.lang.String str)
public void setYear(int year)
public void setComment(java.lang.String str)
public void setGenre(byte genre)
public void setTrack(byte track)
public void write(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static Tag read(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Tag t)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |