public abstract class VorbisStyleComments extends HighLevelOggStreamPacket implements OggAudioTagsHeader
| 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 |
| Constructor and Description |
|---|
VorbisStyleComments() |
VorbisStyleComments(OggPacket pkt,
int dataBeginsAt) |
| 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 abstract int |
getHeaderSize() |
protected int |
getInt4(byte[] d,
int offset) |
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 abstract boolean |
hasFramingBit() |
protected static String |
normaliseTag(String tag)
The tag name is case-insensitive and may consist of ASCII 0x20
through 0x7D, 0x3D (’=’) excluded.
|
protected abstract void |
populateMetadataFooter(OutputStream out) |
protected abstract void |
populateMetadataHeader(byte[] data,
int packetLength) |
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() |
getData, getOggOverheadSize, getOggPacket, setDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetData, getOggOverheadSize, setDatapublic 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 VorbisStyleComments(OggPacket pkt, int dataBeginsAt)
public VorbisStyleComments()
public String getVendor()
getVendor in interface OggAudioTagsHeaderpublic void setVendor(String vendor)
protected static String normaliseTag(String tag)
public String getArtist()
getArtist in interface OggAudioTagsHeaderpublic String getAlbum()
getAlbum in interface OggAudioTagsHeaderpublic String getTitle()
getTitle in interface OggAudioTagsHeaderpublic String getGenre()
getGenre in interface OggAudioTagsHeaderpublic String getTrackNumber()
getTrackNumber in interface OggAudioTagsHeaderpublic int getTrackNumberNumeric()
getTrackNumberNumeric in interface OggAudioTagsHeaderpublic String getDate()
getDate in interface OggAudioTagsHeaderpublic List<String> getComments(String tag)
getComments in interface OggAudioTagsHeaderpublic void removeComments(String tag)
public void removeAllComments()
public void setComments(String tag, List<String> comments)
public Map<String,List<String>> getAllComments()
getAllComments in interface OggAudioTagsHeaderprotected abstract int getHeaderSize()
protected abstract boolean hasFramingBit()
protected abstract void populateMetadataHeader(byte[] data,
int packetLength)
protected abstract void populateMetadataFooter(OutputStream out)
protected int getInt4(byte[] d,
int offset)
public OggPacket write()
write in interface OggStreamPacketwrite in class HighLevelOggStreamPacketCopyright © 2021. All rights reserved.