|
|||||||||
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.YearFrame
public class YearFrame
This class is the ID3v2 TYER frame type, which holds a four-character numeric string representing a year.
Field Summary | |
---|---|
static java.lang.String |
MY_ID
The Frame ID for a YearFrame. |
private int |
year
The year is the data. |
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 | |
---|---|
YearFrame()
Constructs a new YearFrame with no data. |
|
YearFrame(FrameHeader header)
Constructs a new instance using the specified FrameHeader object. |
Method Summary | |
---|---|
void |
addDate(java.util.Calendar c)
Sets the year of the frame. |
void |
addDate(java.util.Date d)
Sets the year of the frame. |
void |
addDateRange(java.util.Calendar begin,
java.util.Calendar end)
Sets the year of the frame. |
void |
clearDate()
Clears the frame data. |
java.lang.Object |
clone()
Returns a clone of this ID3v2 frame. |
boolean |
equals(java.lang.Object other)
Compares this ID3v2 frame with another object. |
java.util.Calendar |
getDate()
Get the first date for this frame. |
java.util.Enumeration |
getDates()
Get all dates for this frame. |
java.lang.String |
getText()
Returns the text contained in this frame. |
boolean |
isSet()
Whether this frame's data has been set. |
static int |
SanitizeYear(int year)
Determine whether the supplied integer value is a decent value for the year of a recording date or the release date of a record, and return a decent value based on the input. |
void |
setDate(java.util.Calendar c)
Sets the year of the frame. |
void |
setDate(java.util.Date d)
Sets the year of the frame. |
void |
setDateRange(java.util.Calendar begin,
java.util.Calendar end)
Sets a date range for the frame. |
void |
setText(java.lang.String frameText)
Sets the text contained in this frame. |
void |
setYear(int y)
Sets the year of the frame. |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.TextFrame |
---|
getRawData, 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 |
---|
public static final java.lang.String MY_ID
private int year
Constructor Detail |
---|
YearFrame()
public YearFrame(FrameHeader header)
header
- The FrameHeader to be used for this frame.Method Detail |
---|
public static int SanitizeYear(int year)
year
- the year during whith the track was recorded or released.
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 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 or not parseable.public void setYear(int y)
y
- the year to use for the frame.public void clearDate()
clearDate
in interface DateFrame
public boolean isSet()
isSet
in interface DateFrame
public void setDate(java.util.Calendar c)
setDate
in interface DateFrame
c
- the date to use for the frame's year.public void setDate(java.util.Date d)
setDate
in interface DateFrame
d
- the date to use for the frame's year.public void setDateRange(java.util.Calendar begin, java.util.Calendar end)
setDateRange
in interface DateFrame
begin
- the beginning dateend
- the ending date.public void addDate(java.util.Calendar c)
addDate
in interface DateFrame
c
- the date to use for the frame's year.public void addDate(java.util.Date d)
addDate
in interface DateFrame
d
- the date to use for the frame's year.public void addDateRange(java.util.Calendar begin, java.util.Calendar end)
addDateRange
in interface DateFrame
begin
- the beginning date.end
- the ending date.public java.util.Calendar getDate()
getDate
in interface DateFrame
public java.util.Enumeration getDates()
getDates
in interface DateFrame
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |