|
|||||||||
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
com.tffenterprises.music.tag.id3v2.frame.FractionFrame
public class FractionFrame
This class implements the TRCK frame type, which encodes the track number in an ID3v2 frame.
Field Summary | |
---|---|
private short |
item
The item number. |
private short |
total
The total number of items. |
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 | |
---|---|
FractionFrame()
Constructs a new TextFrame with no data, and no valid frame type. |
|
FractionFrame(FrameHeader header)
Constructs a new FractionFrame with the specified frame header and no data. |
|
FractionFrame(FrameHeader header,
short item,
short total)
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. |
short |
getItem()
Returns the item number. |
java.lang.String |
getPartName()
Returns the name of the part of a whole represented by this frame type. |
java.lang.String |
getText()
Returns the text contained in this frame. |
short |
getTotal()
Returns the total number of items. |
private void |
sanitize()
Fixes any numbers that don't make sense, and synchronizes the string in the parent class with our numbers. |
void |
setItem(short i)
Set the item number. |
void |
setText(java.lang.String frameText)
Sets the text contained in this frame. |
void |
setTotal(short t)
Set the total number of items. |
java.lang.String |
toString()
Returns a String representation of this frame. |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.TextFrame |
---|
getRawData, isOfRepeatableType, setRawData |
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 short item
private short total
Constructor Detail |
---|
public FractionFrame()
public FractionFrame(FrameHeader header)
header
- The FrameHeader instance to be used for this TextFrame.
java.lang.IllegalArgumentException
- if the specified frame data is null.public FractionFrame(FrameHeader header, short item, short total) throws java.lang.IllegalArgumentException
header
- The FrameHeader instance to be used for this TextFrame.item
- The item number.total
- The total number of items.
java.lang.IllegalArgumentException
- if the specified frame data is null.Method Detail |
---|
public java.lang.Object clone()
clone
in class TextFrame
public boolean equals(java.lang.Object other)
equals
in class TextFrame
other
- The other object.
public java.lang.String toString()
toString
in class TextFrame
public java.lang.String getText()
getText
in class TextFrame
public void setText(java.lang.String frameText)
setText
in class TextFrame
frameText
- The text.
java.lang.IllegalArgumentException
- if the text is null.public short getItem()
public void setItem(short i)
i
- the new item number.public short getTotal()
public void setTotal(short t)
t
- the new total of items.private void sanitize()
public java.lang.String getPartName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |