|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
net.shredzone.ifish.ltr
Class TagMp3v2
java.lang.Objectnet.shredzone.ifish.ltr.LTR
net.shredzone.ifish.ltr.LTRmp3
net.shredzone.ifish.ltr.TagMp3v2
Decodes an MP3 file with ID3v2 tag. The file is compliant to the specifications found at www.id3.org, V2.4.0 and V2.3.0. ID3 V2.2.0 is handled in a separate tag handler. Anyhow it has certain limitations regarding tag frames which could not be used or entirely used to iFish, e.g. multiple genres.
- Version:
- $Id: TagMp3v2.java 338 2009-06-28 23:15:58Z shred $
| Field Summary |
|---|
| Fields inherited from class net.shredzone.ifish.ltr.LTR |
|---|
factory, in |
| Constructor Summary | |
|---|---|
TagMp3v2(RandomAccessFile in,
LTRFactory factory)
Create a new TagMp3v2 instance. |
|
| Method Summary | |
|---|---|
String |
getAlbum()
Get the album. |
String |
getArtist()
Get the artist. |
String |
getComment()
Get the comment. |
String |
getGenre()
Get the genre. |
String |
getTitle()
Get the title. |
String |
getTrack()
Get the track. |
String |
getType()
Get the type of this file. |
String |
getYear()
Get the year. |
protected int |
readAutoInt()
Read an ID3v2 integer. |
protected net.shredzone.ifish.ltr.TagMp3v2.Frame |
readFrame()
Read a tag frame. |
| Methods inherited from class net.shredzone.ifish.ltr.LTRmp3 |
|---|
decodeGenre, readInt, readSyncsafe, readSyncsafeInt |
| Methods inherited from class net.shredzone.ifish.ltr.LTR |
|---|
readStringLen, readStringLen, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
TagMp3v2
public TagMp3v2(RandomAccessFile in, LTRFactory factory) throws FormatDecodeException
- Create a new TagMp3v2 instance.
- Parameters:
in- File to be readfactory- Reference to the LTRFactory- Throws:
FormatDecodeException- Couldn't decode this file
| Method Detail |
|---|
getType
public String getType()
- Get the type of this file. This is usually the compression format
itself (e.g. "OGG" or "MP3"). If there are different taggings for
this format, the used tag format is appended after a slash (e.g.
"MP3/id3v2").
- Returns:
- The type
getArtist
public String getArtist()
getAlbum
public String getAlbum()
getTitle
public String getTitle()
getGenre
public String getGenre()
getYear
public String getYear()
getComment
public String getComment()
- Get the comment.
- Specified by:
getCommentin classLTR
- Returns:
- The comment (never null)
getTrack
public String getTrack()
readAutoInt
protected int readAutoInt() throws IOException
- Read an ID3v2 integer. This is a 4 byte big endian value, which is
only syncsafe for ID3v2.4 or higher, but not for ID3v2.3.
- Returns:
- The integer read.
- Throws:
IOException- If there were not enough bytes in the file.
readFrame
protected net.shredzone.ifish.ltr.TagMp3v2.Frame readFrame() throws IOException
- Read a tag frame. A Frame object will be returned, or null if no
more frames were available.
- Returns:
- The next frame, or null
- Throws:
IOException- If premature EOF was reached.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2007-2011 shredzone.org. All Rights Reserved.
