Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitUSERID3V2Frame(this);
|
public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof USERID3V2Frame)))
{
return false;
}
USERID3V2Frame oOtherUSER = (USERID3V2Frame)oOther;
return (m_oTextEncoding.equals(oOtherUSER.m_oTextEncoding) &&
m_sLanguage.equals(oOtherUSER.m_sLanguage) &&
m_sTermsOfUse.equals(oOtherUSER.m_sTermsOfUse));
|
protected byte[] | getFrameId()
return "USER".getBytes();
|
public java.lang.String | getLanguage()Get the language of the terms of use.
return m_sLanguage;
|
public java.lang.String | getTermsOfUse()Get the terms of use for this file.
return m_sTermsOfUse;
|
public TextEncoding | getTextEncoding()Get the text encoding used for the terms of use in this frame.
return m_oTextEncoding;
|
public void | setTermsOfUse(java.lang.String sLanguage, java.lang.String sTermsOfUse)Set the terms of use.
m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
if ((sLanguage == null) || (sLanguage.length() != 3))
{
throw new ID3Exception("Language must be a three character length string in USER frame.");
}
m_sLanguage = sLanguage;
if ((sTermsOfUse == null) || (sTermsOfUse.length() == 0))
{
throw new ID3Exception("Terms of use are required in USER frame.");
}
m_sTermsOfUse = sTermsOfUse;
|
public void | setTextEncoding(TextEncoding oTextEncoding)Set the text encoding to be used for the terms of use in this frame.
if (oTextEncoding == null)
{
throw new NullPointerException("Text encoding cannot be null.");
}
m_oTextEncoding = oTextEncoding;
|
public java.lang.String | toString()
return "Terms of use: Language=[" + m_sLanguage +
"], Terms of use=[" + m_sTermsOfUse + "]";
|
protected void | writeBody(ID3DataOutputStream oIDOS)
oIDOS.write(m_oTextEncoding.getEncodingValue()); // text encoding
oIDOS.write(m_sLanguage.getBytes()); // language
oIDOS.write(m_sTermsOfUse.getBytes(m_oTextEncoding.getEncodingString())); // terms of use
|