|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gagravarr.ogg.HighLevelOggStreamPacket
org.gagravarr.vorbis.VorbisPacket
org.gagravarr.vorbis.VorbisComments
public class VorbisComments
Holds encoder information and user specified tags
Field Summary | |
---|---|
static String |
KEY_ALBUM
|
static String |
KEY_ARTIST
|
static String |
KEY_DATE
|
static String |
KEY_GENRE
|
static String |
KEY_TITLE
|
static String |
KEY_TRACKNUMBER
|
Fields inherited from class org.gagravarr.vorbis.VorbisPacket |
---|
HEADER_LENGTH_AUDIO, HEADER_LENGTH_METADATA, TYPE_COMMENTS, TYPE_INFO, TYPE_SETUP |
Constructor Summary | |
---|---|
VorbisComments()
|
|
VorbisComments(OggPacket pkt)
|
Method Summary | |
---|---|
void |
addComment(String tag,
String comment)
Adds a comment for a given tag |
String |
getAlbum()
Returns the (first) Album, or null if no Album tags present. |
Map<String,List<String>> |
getAllComments()
Returns all the comments |
String |
getArtist()
Returns the (first) Artist, or null if no Artist tags present. |
List<String> |
getComments(String tag)
Returns all comments for a given tag, in file order. |
String |
getDate()
Returns the (first) Date, or null if no Date tags present. |
String |
getGenre()
Returns the (first) Genre, or null if no Genre tags present. |
protected int |
getHeaderSize()
How big is the header on this packet? For Metadata packets it's normally 7 bytes, otherwise for audio packets there is no header. |
protected String |
getSingleComment(String normalisedTag)
|
String |
getTitle()
Returns the (first) Title, or null if no Title tags present. |
String |
getTrackNumber()
Returns the (first) track number as a literal string, eg "4" or "09", or null if no track number tags present; |
int |
getTrackNumberNumeric()
Returns the track number, as converted into an integer, or -1 if not available / not numeric |
String |
getVendor()
|
protected static String |
normaliseTag(String tag)
The tag name is case-insensitive and may consist of ASCII 0x20 through 0x7D, 0x3D (���=���) excluded. |
void |
removeAllComments()
Removes all comments across all tags |
void |
removeComments(String tag)
Removes all comments for a given tag. |
void |
setComments(String tag,
List<String> comments)
Removes any existing comments for a given tag, and replaces them with the supplied list |
void |
setVendor(String vendor)
|
OggPacket |
write()
|
Methods inherited from class org.gagravarr.vorbis.VorbisPacket |
---|
create, isVorbisStream, populateMetadataHeader |
Methods inherited from class org.gagravarr.ogg.HighLevelOggStreamPacket |
---|
getData, getOggPacket, setData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_ARTIST
public static final String KEY_ALBUM
public static final String KEY_TITLE
public static final String KEY_GENRE
public static final String KEY_TRACKNUMBER
public static final String KEY_DATE
Constructor Detail |
---|
public VorbisComments(OggPacket pkt)
public VorbisComments()
Method Detail |
---|
protected int getHeaderSize()
VorbisPacket
getHeaderSize
in class VorbisPacket
public String getVendor()
public void setVendor(String vendor)
protected static String normaliseTag(String tag)
protected String getSingleComment(String normalisedTag)
public String getArtist()
public String getAlbum()
public String getTitle()
public String getGenre()
public String getTrackNumber()
public int getTrackNumberNumeric()
public String getDate()
public List<String> getComments(String tag)
public void removeComments(String tag)
public void removeAllComments()
public void addComment(String tag, String comment)
public void setComments(String tag, List<String> comments)
public Map<String,List<String>> getAllComments()
public OggPacket write()
write
in class HighLevelOggStreamPacket
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |