com.tffenterprises.music.tag.id3v2.frame
Class TrackFrame

java.lang.Object
  extended by com.tffenterprises.music.tag.id3v2.Frame
      extended by com.tffenterprises.music.tag.id3v2.frame.BaseFrame
          extended by com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame
              extended by com.tffenterprises.music.tag.id3v2.frame.TextFrame
                  extended by com.tffenterprises.music.tag.id3v2.frame.FractionFrame
                      extended by com.tffenterprises.music.tag.id3v2.frame.TrackFrame
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TrackFrame
extends FractionFrame
implements java.io.Serializable, java.lang.Cloneable

This class implements the TRCK frame type, which encodes the track number in an ID3v2 frame.

Version:
1.0d1 $Date: 2003/03/24 07:53:44 $
Author:
Guillamue Lessard
See Also:
Serialized Form

Field Summary
static java.lang.String MY_ID
          The ID for this frame type.
static java.lang.String PART_NAME
          A string for the part name represented by this frame type.
 
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
TrackFrame()
          Constructs a new TextFrame with no data, and no valid frame type.
TrackFrame(FrameHeader header)
          Constructs a new TrackFrame with the specified frame header and no data.
TrackFrame(FrameHeader header, short track, short total)
          Constructs a new TextFrame with the specified frame header and text.
 
Method Summary
 java.lang.String getPartName()
          Returns the name of the part of a whole represented by this frame type.
 short getTrack()
          Returns the track number.
 void setTrack(short t)
          Set the track number.
 
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.FractionFrame
clone, equals, getItem, getText, getTotal, setItem, setText, setTotal, toString
 
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

MY_ID

public static final java.lang.String MY_ID
The ID for this frame type.

See Also:
Constant Field Values

PART_NAME

public static final java.lang.String PART_NAME
A string for the part name represented by this frame type.

See Also:
Constant Field Values
Constructor Detail

TrackFrame

public TrackFrame()
Constructs a new TextFrame with no data, and no valid frame type.


TrackFrame

public TrackFrame(FrameHeader header)
Constructs a new TrackFrame with the specified frame header and no data.

Parameters:
header - The FrameHeader instance to be used for this TextFrame.
Throws:
java.lang.IllegalArgumentException - if the specified frame data is null.

TrackFrame

public TrackFrame(FrameHeader header,
                  short track,
                  short total)
           throws java.lang.IllegalArgumentException
Constructs a new TextFrame with the specified frame header and text.

Parameters:
header - The FrameHeader instance to be used for this TextFrame.
track - The track number.
total - The total number of tracks.
Throws:
java.lang.IllegalArgumentException - if the specified frame data is null.
Method Detail

getTrack

public short getTrack()
Returns the track number.

Returns:
the track number.

setTrack

public void setTrack(short t)
Set the track number.

Parameters:
t - the new track number.

getPartName

public java.lang.String getPartName()
Returns the name of the part of a whole represented by this frame type.

Overrides:
getPartName in class FractionFrame
Returns:
the name of the part of a whole represented by this frame type.