TPE1TextInformationID3V2Framepublic class TPE1TextInformationID3V2Frame extends TextInformationID3V2Frame
Fields Summary |
---|
private String[] | m_asLeadPerformer |
Constructors Summary |
---|
public TPE1TextInformationID3V2Frame(String sLeadPerformer)Constructor.
super(sLeadPerformer);
m_asLeadPerformer = getPerformers(sLeadPerformer);
| public TPE1TextInformationID3V2Frame(String[] asLeadPerformer)Constructor.
super("");
// build single string of composers, separated by "/", as described in ID3 spec
StringBuffer sbLeadPerformers = new StringBuffer();
for (int i=0; i < asLeadPerformer.length; i++)
{
sbLeadPerformers.append(asLeadPerformer[i] + "/");
}
sbLeadPerformers.deleteCharAt(sbLeadPerformers.length()-1); // delete last "/"
m_sInformation = sbLeadPerformers.toString();
m_asLeadPerformer = getPerformers(m_sInformation);
| public TPE1TextInformationID3V2Frame(InputStream oIS)
super(oIS);
m_asLeadPerformer = getPerformers(m_sInformation);
|
Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitTPE1TextInformationID3V2Frame(this);
| public boolean | equals(java.lang.Object oOther)
if ((oOther == null) || (!(oOther instanceof TPE1TextInformationID3V2Frame)))
{
return false;
}
TPE1TextInformationID3V2Frame oOtherTPE1 = (TPE1TextInformationID3V2Frame)oOther;
return (m_sInformation.equals(oOtherTPE1.m_sInformation) &&
m_oTextEncoding.equals(oOtherTPE1.m_oTextEncoding) &&
Arrays.equals(m_asLeadPerformer, oOtherTPE1.m_asLeadPerformer));
| protected byte[] | getFrameId()
return "TPE1".getBytes();
| public java.lang.String[] | getLeadPerformers()Get the lead artist(s), performer(s), soloist(s) or performing group for this track.
return m_asLeadPerformer;
| private java.lang.String[] | getPerformers(java.lang.String sValue)Split a string containing potentially several distinct values (forward-slash separated) into
an array of Strings, one value per String.
String[] asPerformer = sValue.split("/");
return asPerformer;
| public void | setLeadPerformer(java.lang.String sLeadPerformer)Set the lead artist, performer, soloist or performing group for this track.
Multiple values can optionally be set with this method
by separating them with a slash "/" character.
m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
m_sInformation = sLeadPerformer;
m_asLeadPerformer = getPerformers(sLeadPerformer);
| public void | setLeadPerformers(java.lang.String[] asLeadPerformer)Set the lead artist(s), performer(s), soloist(s) or performing group for this track.
// build single string of performers, separated by "/", as described in ID3 spec
StringBuffer sbLeadPerformers = new StringBuffer();
for (int i=0; i < asLeadPerformer.length; i++)
{
sbLeadPerformers.append(asLeadPerformer[i] + "/");
}
sbLeadPerformers.deleteCharAt(sbLeadPerformers.length()-1); // delete last "/"
m_oTextEncoding = TextEncoding.getDefaultTextEncoding();
m_sInformation = sbLeadPerformers.toString();
m_asLeadPerformer = getPerformers(m_sInformation);
| public java.lang.String | toString()
return "Lead performer(s)/Soloist(s): [" + m_sInformation + "]";
|
|