Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitTDATTextInformationID3V2Frame(this);
|
private boolean | checkDayMonthValidity(int iDay, int iMonth)Internal method which checks a given day/month combination to see if it is valid.
return !
(
(iDay < 1) ||
// months with 31 days
(
(
(iMonth == 1) ||
(iMonth == 3) ||
(iMonth == 5) ||
(iMonth == 7) ||
(iMonth == 8) ||
(iMonth == 10) ||
(iMonth == 12)
) &&
(iDay > 31)
) ||
// months with 30 days
(
(
(iMonth == 4) ||
(iMonth == 6) ||
(iMonth == 9) ||
(iMonth == 11)
) &&
(iDay > 30)
) ||
// february (no year specified, so can't check for leap years
(
(iMonth == 2) &&
(iDay > 29)
)
);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof TDATTextInformationID3V2Frame)))
{
return false;
}
TDATTextInformationID3V2Frame oOtherTDAT = (TDATTextInformationID3V2Frame)oOther;
return ((m_iDay == oOtherTDAT.m_iDay) &&
(m_iMonth == oOtherTDAT.m_iMonth) &&
m_oTextEncoding.equals(oOtherTDAT.m_oTextEncoding) &&
m_sInformation.equals(oOtherTDAT.m_sInformation));
|
public int | getDay()Get the day on which this recording was made.
return m_iDay;
|
protected byte[] | getFrameId()
return "TDAT".getBytes();
|
public int | getMonth()Get the month in which the recording was made.
return m_iMonth;
|
public void | setDate(int iDay, int iMonth)Set the date on which this recording was made.
// make sure the values we've been given for day and month are legal
if ( ! checkDayMonthValidity(iDay, iMonth))
{
throw new ID3Exception("Invalid day/month combination " + iDay + "/" + iMonth + ".");
}
NumberFormat oNF = new DecimalFormat("00");
m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
m_sInformation = oNF.format(iDay) + oNF.format(iMonth);
m_iDay = iDay;
m_iMonth = iMonth;
|
public java.lang.String | toString()
return "Date (DDMM): [" + m_sInformation + "]";
|