public class FrameBodyCOMM extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
<Header for 'Comment', ID: "COMM"> | |
Text encoding | $xx |
Language | $xx xx xx |
Short content descrip. | <text string according to encoding> $00 (00) |
The actual text | <full text string according to encoding> |
For more details, please refer to the ID3 specifications:
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT |
static String |
ITUNES_NORMALIZATION |
static String |
MM_CUSTOM1 |
static String |
MM_CUSTOM2 |
static String |
MM_CUSTOM3 |
static String |
MM_CUSTOM4 |
static String |
MM_CUSTOM5 |
static String |
MM_OCCASION |
static String |
MM_QUALITY |
static String |
MM_TEMPO |
TYPE_BODY
objectList
logger
Constructor and Description |
---|
FrameBodyCOMM()
Creates a new FrameBodyCOMM datatype.
|
FrameBodyCOMM(ByteBuffer byteBuffer,
int frameSize)
Construct a Comment frame body from the buffer
|
FrameBodyCOMM(byte textEncoding,
String language,
String description,
String text)
Creates a new FrameBodyCOMM datatype.
|
FrameBodyCOMM(FrameBodyCOMM body) |
Modifier and Type | Method and Description |
---|---|
void |
addTextValue(String value)
Add additional value to value
|
String |
getDescription()
Get the description field, which describes the type of comment
|
String |
getFirstTextValue()
Get first value
|
String |
getIdentifier()
The ID3v2 frame identifier
|
String |
getLanguage()
Get the language the comment is written in
|
int |
getNumberOfValues() |
String |
getText()
Returns the the text field which holds the comment, adjusted to ensure does not return trailing null
which is due to a iTunes bug.
|
String |
getTextWithoutTrailingNulls()
Retrieve the complete text String but without any trailing nulls
If multiple values are held these will be returned, needless trailing nulls will not be returned
|
String |
getUserFriendlyValue() |
String |
getValueAtIndex(int index)
Get text value at index
When a multiple values are stored within a single text frame this method allows access to any of the
individual values.
|
List<String> |
getValues() |
boolean |
isItunesFrame() |
boolean |
isMediaMonkeyFrame() |
void |
setDescription(String description)
Set the description field, which describes the type of comment
|
void |
setLanguage(String language)
Sets the language the comment is written in
|
void |
setText(String text) |
protected void |
setupObjectList()
Create the list of Datatypes that this body
expects in the correct order This method needs to be implemented by concrete subclasses
|
void |
write(ByteArrayOutputStream tagBuffer)
Because COMM have a text encoding we need to check the text String does
not contain characters that cannot be encoded in current encoding before
we write data.
|
createStructure, equals, getSize, read, setSize, setSize
getBriefDescription, getHeader, getLongDescription, getObject, getObjectValue, getTextEncoding, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString
public static final String DEFAULT
public static final String ITUNES_NORMALIZATION
public static final String MM_CUSTOM1
public static final String MM_CUSTOM2
public static final String MM_CUSTOM3
public static final String MM_CUSTOM4
public static final String MM_CUSTOM5
public static final String MM_OCCASION
public static final String MM_QUALITY
public static final String MM_TEMPO
public FrameBodyCOMM()
public FrameBodyCOMM(FrameBodyCOMM body)
public FrameBodyCOMM(byte textEncoding, String language, String description, String text)
textEncoding
- language
- description
- text
- public FrameBodyCOMM(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
- InvalidTagException
- if unable to create framebody from bufferpublic boolean isMediaMonkeyFrame()
public boolean isItunesFrame()
public void setDescription(String description)
description
- public String getDescription()
public String getIdentifier()
getIdentifier
in class AbstractID3v2FrameBody
public void setLanguage(String language)
language
- public String getLanguage()
public void setText(String text)
text
- public String getText()
public String getUserFriendlyValue()
getUserFriendlyValue
in class AbstractTagFrameBody
protected void setupObjectList()
AbstractTagFrameBody
setupObjectList
in class AbstractTagFrameBody
public void write(ByteArrayOutputStream tagBuffer)
write
in class AbstractID3v2FrameBody
public String getTextWithoutTrailingNulls()
public String getFirstTextValue()
public String getValueAtIndex(int index)
index
- public void addTextValue(String value)
value
- at indexpublic int getNumberOfValues()
Copyright © 2005–2020 jthink.net. All rights reserved.