public class VorbisComments extends VorbisPacket
Modifier and Type | Field and Description |
---|---|
static String |
KEY_ALBUM |
static String |
KEY_ARTIST |
static String |
KEY_DATE |
static String |
KEY_GENRE |
static String |
KEY_TITLE |
static String |
KEY_TRACKNUMBER |
HEADER_LENGTH_AUDIO, HEADER_LENGTH_METADATA, TYPE_COMMENTS, TYPE_INFO, TYPE_SETUP
Constructor and Description |
---|
VorbisComments() |
VorbisComments(OggPacket pkt) |
Modifier and Type | Method and Description |
---|---|
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() |
create, isVorbisStream, populateMetadataHeader
getData, getOggPacket, setData
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
public VorbisComments(OggPacket pkt)
public VorbisComments()
protected int getHeaderSize()
VorbisPacket
getHeaderSize
in class VorbisPacket
public String getVendor()
public void setVendor(String vendor)
protected static String normaliseTag(String tag)
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 setComments(String tag, List<String> comments)
public OggPacket write()
write
in class HighLevelOggStreamPacket
Copyright © 2013. All rights reserved.