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

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.ContentTypeFrame
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ContentTypeFrame
extends TextFrame
implements java.io.Serializable, java.lang.Cloneable

This class is the ID3v2 TCON frame type, which attempts to represent the type of content of a given track. It fails, but at least

Version:
1.0d1 $Date: 2002/10/31 08:23:16 $
Author:
Guillaume Lessard, Michael Schrag
See Also:
Serialized Form

Field Summary
static java.lang.String COVER_CODE
          A standard string to designate a cover version
private  byte genre
          The genre as a byte, ID3v1-style
private  boolean isACover
          A boolean set if the track is (known to be) a cover version
private  boolean isARemix
          A boolean set if the track is (known to be) a remix
static java.lang.String MY_ID
          The Frame ID for a YearFrame.
static java.lang.String REMIX_CODE
          A standard string to designate a remix
 
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
ContentTypeFrame()
          Constructs a new YearFrame with no data.
ContentTypeFrame(FrameHeader header)
          Constructs a new instance using the specified FrameHeader object.
 
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 getGenreAsByte()
           
 boolean isContentCover()
           
 boolean isContentRemix()
           
 void setContentCover(boolean cover)
           
 void setContentRemix(boolean remix)
           
 void setGenreAsByte(byte newGenre)
           
 void setText(java.lang.String genreString)
          Sets the text contained in this frame.
private  void updateString()
           
 
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.TextFrame
getRawData, getText, isOfRepeatableType, setRawData, toString
 
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 Frame ID for a YearFrame.

See Also:
Constant Field Values

REMIX_CODE

public static final java.lang.String REMIX_CODE
A standard string to designate a remix

See Also:
Constant Field Values

COVER_CODE

public static final java.lang.String COVER_CODE
A standard string to designate a cover version

See Also:
Constant Field Values

genre

private byte genre
The genre as a byte, ID3v1-style


isACover

private boolean isACover
A boolean set if the track is (known to be) a cover version


isARemix

private boolean isARemix
A boolean set if the track is (known to be) a remix

Constructor Detail

ContentTypeFrame

ContentTypeFrame()
Constructs a new YearFrame with no data.


ContentTypeFrame

public ContentTypeFrame(FrameHeader header)
Constructs a new instance using the specified FrameHeader object.

Parameters:
header - The FrameHeader to be used for this frame.
Method Detail

clone

public java.lang.Object clone()
Returns a clone of this ID3v2 frame.

Overrides:
clone in class TextFrame
Returns:
a clone of this ID3v2 frame.

equals

public boolean equals(java.lang.Object other)
Compares this ID3v2 frame with another object.

Overrides:
equals in class TextFrame
Parameters:
other - The other object.
Returns:
true if the two objects are equivalent, false otherwise.

setText

public void setText(java.lang.String genreString)
Description copied from class: TextFrame
Sets the text contained in this frame.

Overrides:
setText in class TextFrame
Parameters:
genreString - The text.

getGenreAsByte

public byte getGenreAsByte()

setGenreAsByte

public void setGenreAsByte(byte newGenre)

isContentRemix

public boolean isContentRemix()

setContentRemix

public void setContentRemix(boolean remix)

isContentCover

public boolean isContentCover()

setContentCover

public void setContentCover(boolean cover)

updateString

private void updateString()