|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tffenterprises.music.tag.id3v2.Frame
com.tffenterprises.music.tag.id3v2.frame.BaseFrame
com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame
com.tffenterprises.music.tag.id3v2.frame.TextFrame
public class TextFrame
This class is the ID3v2 "Text Information Frame" frame type; it handles all types of text frames, though it does so in a generic fashion. Text frames which need specific types of parsing are handled by subclasses of this class. The data of a text frame, as far as this class is concerned, is a single string (either Unicode or ISO-8859-1).
Field Summary | |
---|---|
private java.lang.String |
frameText
The data contained in this frame. |
Fields inherited from class com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame |
---|
BOM_CHAR, BOM_CHAR_STRING, ENCODING_STRINGS, ISO_8859_1, NULL_BOM_STRING, NULL_CHAR, NULL_CHAR_STRING, UNICODE, UNICODE_BIG, UNICODE_LITTLE, UTF8 |
Constructor Summary | |
---|---|
TextFrame()
Constructs a new TextFrame with no data, and no valid frame type. |
|
TextFrame(FrameHeader header)
Constructs a new TextFrame with the specified frame header and no text. |
|
TextFrame(FrameHeader header,
java.lang.String frameText)
Constructs a new TextFrame with the specified frame header and text. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of this ID3v2 frame. |
boolean |
equals(java.lang.Object other)
Compares this ID3v2 frame with another object. |
byte[] |
getRawData()
Returns the raw data corresponding to this frame. |
java.lang.String |
getText()
Returns the text contained in this frame. |
boolean |
isOfRepeatableType()
Returns whether it is correct for multiple frames of this type to coexist in the same ID3v2 tag. |
void |
setRawData(byte[] rawData)
Sets the raw data corresponding to this frame. |
void |
setText(java.lang.String frameText)
Sets the text contained in this frame. |
java.lang.String |
toString()
Returns a String representation of this frame. |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame |
---|
getNullBytes, getTextEncoding, getTextEncoding, getTextEncoding, is8859String, read8859Characters, read8859String, readCharacters, readString, readUnicodeCharacters, readUnicodeString |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.BaseFrame |
---|
getBytes, getChecksum, getFormatFlags, getFrameID, getHeader, getStatusFlags, hashCode, isChanged, setChanged, setFormatFlags, setStatusFlags, toByteArray, updateChecksum, writeTo |
Methods inherited from class com.tffenterprises.music.tag.id3v2.Frame |
---|
FromByteArray, FromByteArray, FromInputStream, GetFrameClassForID, getNewInstance, getNewInstance, getNewInstance, MinimumLength, RegisterFrameClass, UnregisterFrameClass |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String frameText
Constructor Detail |
---|
TextFrame()
public TextFrame(FrameHeader header)
header
- The FrameHeader instance to be used for this TextFrame.public TextFrame(FrameHeader header, java.lang.String frameText) throws java.lang.IllegalArgumentException
header
- The FrameHeader instance to be used for this TextFrame.frameText
- The frame text.
java.lang.IllegalArgumentException
- if the specified frame data is null.Method Detail |
---|
public java.lang.Object clone()
clone
in class BaseFrame
public boolean equals(java.lang.Object other)
equals
in class BaseFrame
other
- The other object.
public java.lang.String toString()
toString
in class BaseFrame
public byte[] getRawData()
getRawData
in class BaseFrame
public void setRawData(byte[] rawData) throws FrameDataFormatException, java.lang.IllegalArgumentException
setText(String)
method, which should perform the parsing for TextFrame
subclasses.
setRawData
in class BaseFrame
rawData
- The raw data.
FrameDataFormatException
- if the raw data is not in an
appropriate format for this
frame's type.
java.lang.IllegalArgumentException
- if the specified raw data is null.public boolean isOfRepeatableType()
TextFrame
is supposed to represent the so-called "Text Information Frames" of
ID3v2, this will return false
; those frames cannot
exist in multiple copies in a given tag.
isOfRepeatableType
in class BaseFrame
public java.lang.String getText()
public void setText(java.lang.String frameText)
frameText
- The text.
java.lang.IllegalArgumentException
- if the text is null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |