Methods Summary |
---|
public void | accept(ID3Visitor oID3Visitor)
oID3Visitor.visitID3V2_3_0Tag(this);
ID3V2Frame[] aoID3V2Frame = getAllFrames();
for (int i=0; i < aoID3V2Frame.length; i++)
{
aoID3V2Frame[i].accept(oID3Visitor);
}
|
public void | addAENCFrame(AENCID3V2Frame oAENCID3V2Frame)Add an audio encryption frame to this tag. Multiple AENC frames can be added to a single tag, but each
must have a unique owner identifier.
if (oAENCID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null AENC frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oAENCOwnerIdentifierToFrameMap.containsKey(oAENCID3V2Frame.getOwnerIdentifier())))
{
throw new ID3Exception("Tag already contains AENC frame with matching owner identifier.");
}
m_oAENCOwnerIdentifierToFrameMap.put(oAENCID3V2Frame.getOwnerIdentifier(), oAENCID3V2Frame);
// set this tag object up as a listener for changes to this frame
oAENCID3V2Frame.addID3Observer(this);
oAENCID3V2Frame.notifyID3Observers();
|
public void | addAPICFrame(APICID3V2Frame oAPICID3V2Frame)Add an attached picture frame to this tag. Multiple APIC frames can be added to a single tag, but each
must have a unique description.
if (oAPICID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null APIC frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oAPICDescriptionToFrameMap.containsKey(oAPICID3V2Frame.getDescription())))
{
throw new ID3Exception("Tag already contains APIC frame with matching description.");
}
m_oAPICDescriptionToFrameMap.put(oAPICID3V2Frame.getDescription(), oAPICID3V2Frame);
// set this tag object up as a listener for changes to this frame
oAPICID3V2Frame.addID3Observer(this);
oAPICID3V2Frame.notifyID3Observers();
|
public void | addCOMMFrame(COMMID3V2Frame oCOMMID3V2Frame)Add a comment frame to this tag. Multiple COMM frames can be added to a single tag, but each
must have a unique language and content descriptor.
if (oCOMMID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null COMM frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oCOMMLanguageAndContentDescriptorToFrameMap.containsKey(oCOMMID3V2Frame.getLanguage() + oCOMMID3V2Frame.getShortDescription())))
{
throw new ID3Exception("Tag already contains COMM frame with matching language and short description.");
}
m_oCOMMLanguageAndContentDescriptorToFrameMap.put(oCOMMID3V2Frame.getLanguage() + oCOMMID3V2Frame.getShortDescription(), oCOMMID3V2Frame);
// set this tag object up as a listener for changes to this frame
oCOMMID3V2Frame.addID3Observer(this);
oCOMMID3V2Frame.notifyID3Observers();
|
public void | addENCRFrame(ENCRID3V2Frame oENCRID3V2Frame)Add an encryption frame to this tag. Multiple ENCR frames can be added to a single tag, but each
must have a unique encryption method symbol.
if (oENCRID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null ENCR frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oENCRMethodToFrameMap.containsKey(new Byte(oENCRID3V2Frame.getEncryptionMethodSymbol()))))
{
throw new ID3Exception("Tag already contains ENCR frame with matching method symbol.");
}
Iterator oIter = m_oENCRMethodToFrameMap.values().iterator();
while (oIter.hasNext())
{
ENCRID3V2Frame oENCR = (ENCRID3V2Frame)oIter.next();
if (oENCRID3V2Frame.getOwnerIdentifier().equals(oENCR.getOwnerIdentifier()))
{
throw new ID3Exception("Tag already contains ENCR frame with matching owner identifier.");
}
}
m_oENCRMethodToFrameMap.put(new Byte(oENCRID3V2Frame.getEncryptionMethodSymbol()), oENCRID3V2Frame);
// set this tag object up as a listener for changes to this frame
oENCRID3V2Frame.addID3Observer(this);
oENCRID3V2Frame.notifyID3Observers();
|
public void | addGEOBFrame(GEOBID3V2Frame oGEOBID3V2Frame)Add a general encapsulated object frame to this tag. Multiple GEOB frames can be added to a single tag, but each
must have a unique content descriptor.
if (oGEOBID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null GEOB frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oGEOBContentDescriptorToFrameMap.containsKey(oGEOBID3V2Frame.getContentDescription())))
{
throw new ID3Exception("Tag already contains GEOB frame with matching content descriptor.");
}
m_oGEOBContentDescriptorToFrameMap.put(oGEOBID3V2Frame.getContentDescription(), oGEOBID3V2Frame);
// set this tag object up as a listener for changes to this frame
oGEOBID3V2Frame.addID3Observer(this);
oGEOBID3V2Frame.notifyID3Observers();
|
public void | addGRIDFrame(GRIDID3V2Frame oGRIDID3V2Frame)Add a group identification registration frame to this tag. Multiple GRID frames can be added to a single tag, but each
must have a unique group symbol.
if (oGRIDID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null GRID frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oGRIDGroupSymbolToFrameMap.containsKey(new Byte(oGRIDID3V2Frame.getGroupSymbol()))))
{
throw new ID3Exception("Tag already contains GRID frame with matching group symbol.");
}
m_oGRIDGroupSymbolToFrameMap.put(new Byte(oGRIDID3V2Frame.getGroupSymbol()), oGRIDID3V2Frame);
// set this tag object up as a listener for changes to this frame
oGRIDID3V2Frame.addID3Observer(this);
oGRIDID3V2Frame.notifyID3Observers();
|
public void | addLINKFrame(LINKID3V2Frame oLINKID3V2Frame)Add a linked information frame to this tag. Multiple LINK frames can be added to a single tag, but each
must have unique contents.
if (oLINKID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null LINK frame to tag.");
}
String sContents = new String(oLINKID3V2Frame.getFrameIdentifier()) + oLINKID3V2Frame.getLinkUrl() + oLINKID3V2Frame.getAdditionalData();
if (ID3Tag.usingStrict() && (m_oLINKContentsToFrameMap.containsKey(sContents)))
{
throw new ID3Exception("Tag already contains LINK frame with matching contents.");
}
m_oLINKContentsToFrameMap.put(sContents, oLINKID3V2Frame);
// set this tag object up as a listener for changes to this frame
oLINKID3V2Frame.addID3Observer(this);
oLINKID3V2Frame.notifyID3Observers();
|
public void | addPOPMFrame(POPMID3V2Frame oPOPMID3V2Frame)Add a popularimeter frame to this tag. Multiple POPM frames can be added to a single tag, but each
must have a unique email address.
if (oPOPMID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null POPM frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oPOPMEmailToFrameMap.containsKey(oPOPMID3V2Frame.getEmailToUser())))
{
throw new ID3Exception("Tag already contains POPM frame with matching email address.");
}
m_oPOPMEmailToFrameMap.put(oPOPMID3V2Frame.getEmailToUser(), oPOPMID3V2Frame);
// set this tag object up as a listener for changes to this frame
oPOPMID3V2Frame.addID3Observer(this);
oPOPMID3V2Frame.notifyID3Observers();
|
public void | addPRIVFrame(PRIVID3V2Frame oPRIVID3V2Frame)Add a private frame to this tag. Multiple PRIV frames can be added to a single tag, but each
must have unique contents.
if (oPRIVID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null PRIV frame to tag.");
}
// get an MD5 hash of the private data, which we'll use as part of the key in our frame map
String sHash = null;
try
{
MessageDigest oMD = MessageDigest.getInstance("MD5");
oMD.update(oPRIVID3V2Frame.getPrivateData());
byte[] abyDigest = oMD.digest();
sHash = ID3Util.convertBytesToHexString(abyDigest, false);
}
catch (Exception e)
{
throw new ID3Exception("Error hashing private data in PRIV frame.", e);
}
String sContents = oPRIVID3V2Frame.getOwnerIdentifier() + sHash;
if (ID3Tag.usingStrict() && (m_oPRIVContentsToFrameMap.containsKey(sContents)))
{
throw new ID3Exception("Tag already contains PRIV frame with matching contents.");
}
m_oPRIVContentsToFrameMap.put(sContents, oPRIVID3V2Frame);
// set this tag object up as a listener for changes to this frame
oPRIVID3V2Frame.addID3Observer(this);
oPRIVID3V2Frame.notifyID3Observers();
|
public void | addSYLTFrame(SYLTID3V2Frame oSYLTID3V2Frame)Add a synchronized lyric/text frame to this tag. Multiple SYLT frames can be added to a single tag, but each
must have a unique language and content descriptor pair.
if (oSYLTID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null SYLT frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oSYLTLanguageAndContentDescriptorToFrameMap.containsKey(oSYLTID3V2Frame.getLanguage() + oSYLTID3V2Frame.getContentDescriptor())))
{
throw new ID3Exception("Tag already contains SYLT frame with matching language and short description.");
}
m_oSYLTLanguageAndContentDescriptorToFrameMap.put(oSYLTID3V2Frame.getLanguage() + oSYLTID3V2Frame.getContentDescriptor(), oSYLTID3V2Frame);
// set this tag object up as a listener for changes to this frame
oSYLTID3V2Frame.addID3Observer(this);
oSYLTID3V2Frame.notifyID3Observers();
|
public void | addTXXXTextInformationFrame(TXXXTextInformationID3V2Frame oTXXXTextInformationID3V2Frame)Add a user-defined text information frame to this tag. Multiple TXXX frames can be added to a single tag, but each
must have a unique description.
if (oTXXXTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null TXXX frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oTXXXDescriptionToFrameMap.containsKey(oTXXXTextInformationID3V2Frame.getDescription())))
{
throw new ID3Exception("Tag already contains TXXX frame with matching description.");
}
m_oTXXXDescriptionToFrameMap.put(oTXXXTextInformationID3V2Frame.getDescription(), oTXXXTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTXXXTextInformationID3V2Frame.addID3Observer(this);
oTXXXTextInformationID3V2Frame.notifyID3Observers();
|
public void | addUFIDFrame(UFIDID3V2Frame oUFIDID3V2Frame)Add a unique file identifier frame to this tag. Multiple UFID frames can be added to a single tag, but each
must have a unique owner identifier.
if (oUFIDID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null UFID frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oUFIDOwnerIdentifierToFrameMap.containsKey(oUFIDID3V2Frame.getOwnerIdentifier())))
{
throw new ID3Exception("Tag already contains UFID frame with matching language and short description.");
}
m_oUFIDOwnerIdentifierToFrameMap.put(oUFIDID3V2Frame.getOwnerIdentifier(), oUFIDID3V2Frame);
// set this tag object up as a listener for changes to this frame
oUFIDID3V2Frame.addID3Observer(this);
oUFIDID3V2Frame.notifyID3Observers();
|
public void | addUSLTFrame(USLTID3V2Frame oUSLTID3V2Frame)Add a unsynchronized lyric/text frame to this tag. Multiple USLT frames can be added to a single tag, but each
must have a unique language and content descriptor pair.
if (oUSLTID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null USLT frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oUSLTLanguageAndContentDescriptorToFrameMap.containsKey(oUSLTID3V2Frame.getLanguage() + oUSLTID3V2Frame.getContentDescriptor())))
{
throw new ID3Exception("Tag already contains USLT frame with matching language and short description.");
}
m_oUSLTLanguageAndContentDescriptorToFrameMap.put(oUSLTID3V2Frame.getLanguage() + oUSLTID3V2Frame.getContentDescriptor(), oUSLTID3V2Frame);
// set this tag object up as a listener for changes to this frame
oUSLTID3V2Frame.addID3Observer(this);
oUSLTID3V2Frame.notifyID3Observers();
|
public void | addUnknownFrame(UnknownID3V2Frame oUnknownID3V2Frame)Add an unknown frame to this tag. This method is for frames which are not defined in the ID3 v2.3.0 spec.
if (ID3Tag.usingStrict())
{
throw new ID3Exception("Cannot add unknown frames to tag when strict mode is enabled.");
}
m_oUnknownFrameList.add(oUnknownID3V2Frame);
|
public void | addWCOMUrlLinkFrame(WCOMUrlLinkID3V2Frame oWCOMUrlLinkID3V2Frame)Add a commercial information frame to this tag. Multiple WCOM frames can be added to a single tag, but each
must have a unique URL.
if (oWCOMUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null WCOM frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oWCOMUrlToFrameMap.containsKey(oWCOMUrlLinkID3V2Frame.getCommercialInformationUrl())))
{
throw new ID3Exception("Tag already contains WCOM frame with matching URL.");
}
m_oWCOMUrlToFrameMap.put(oWCOMUrlLinkID3V2Frame.getCommercialInformationUrl(), oWCOMUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWCOMUrlLinkID3V2Frame.addID3Observer(this);
oWCOMUrlLinkID3V2Frame.notifyID3Observers();
|
public void | addWOARUrlLinkFrame(WOARUrlLinkID3V2Frame oWOARUrlLinkID3V2Frame)Add an official artist/performer webpage frame to this tag. Multiple WOAR frames can be added to a single tag, but each
must have a unique URL.
if (oWOARUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null WOAR frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oWOARUrlToFrameMap.containsKey(oWOARUrlLinkID3V2Frame.getOfficialArtistWebPage())))
{
throw new ID3Exception("Tag already contains WOAR frame with matching URL.");
}
m_oWOARUrlToFrameMap.put(oWOARUrlLinkID3V2Frame.getOfficialArtistWebPage(), oWOARUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWOARUrlLinkID3V2Frame.addID3Observer(this);
oWOARUrlLinkID3V2Frame.notifyID3Observers();
|
public void | addWXXXUrlLinkFrame(WXXXUrlLinkID3V2Frame oWXXXUrlLinkID3V2Frame)Add a user-defined URL link frame to this tag. Multiple WXXX frames can be added to a single tag, but each
must have a unique description.
if (oWXXXUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to add null WXXX frame to tag.");
}
if (ID3Tag.usingStrict() && (m_oWXXXDescriptionToFrameMap.containsKey(oWXXXUrlLinkID3V2Frame.getDescription())))
{
throw new ID3Exception("Tag already contains WXXX frame with matching description.");
}
m_oWXXXDescriptionToFrameMap.put(oWXXXUrlLinkID3V2Frame.getDescription(), oWXXXUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWXXXUrlLinkID3V2Frame.addID3Observer(this);
oWXXXUrlLinkID3V2Frame.notifyID3Observers();
|
public boolean | containsAtLeastOneFrame()Check to see if this tag contains at least one frame.
return ((m_oAENCOwnerIdentifierToFrameMap.size() > 0) ||
(m_oAPICDescriptionToFrameMap.size() > 0) ||
(m_oCOMMLanguageAndContentDescriptorToFrameMap.size() > 0) ||
(m_oENCRMethodToFrameMap.size() > 0) ||
(m_oGEOBContentDescriptorToFrameMap.size() > 0) ||
(m_oGRIDGroupSymbolToFrameMap.size() > 0) ||
(m_oLINKContentsToFrameMap.size() > 0) ||
(m_oPRIVContentsToFrameMap.size() > 0) ||
(m_oPOPMEmailToFrameMap.size() > 0) ||
(m_oSYLTLanguageAndContentDescriptorToFrameMap.size() > 0) ||
(m_oTXXXDescriptionToFrameMap.size() > 0) ||
(m_oUFIDOwnerIdentifierToFrameMap.size() > 0) ||
(m_oUSLTLanguageAndContentDescriptorToFrameMap.size() > 0) ||
(m_oWCOMUrlToFrameMap.size() > 0) ||
(m_oWOARUrlToFrameMap.size() > 0) ||
(m_oWXXXDescriptionToFrameMap.size() > 0) ||
(m_oFrameIdToFrameMap.size() > 0) ||
(m_oUnknownFrameList.size() > 0));
|
private ICryptoAgent | findCryptoAgent(byte byEncryptionMethod)Search for a crypto agent with a specific encryption method symbol. This requires locating a matching ENCR
frame, and then using its owner identifier to lookup a registered crypto agent.
ENCRID3V2Frame[] aoENCR = getENCRFrames();
for (int i=0; i < aoENCR.length; i++)
{
ENCRID3V2Frame oENCRID3V2Frame = aoENCR[i];
if ((oENCRID3V2Frame.getEncryptionMethodSymbol() & 0xff) == (byEncryptionMethod & 0xff))
{
String sOwnerIdentifier = oENCRID3V2Frame.getOwnerIdentifier();
return ID3Encryption.getInstance().lookupCryptoAgent(sOwnerIdentifier);
}
}
return null;
|
private byte[] | findEncryptionData(byte byEncryptionMethod)Search for the encryption data for a specific encryption method symbol. This requires locating a matching ENCR
frame, and then returning whatever encryption data may be stored in it. This data is used as a parameter when
calling an agent to encrypt or decrypt data.
ENCRID3V2Frame[] aoENCR = getENCRFrames();
for (int i=0; i < aoENCR.length; i++)
{
ENCRID3V2Frame oENCRID3V2Frame = aoENCR[i];
if ((oENCRID3V2Frame.getEncryptionMethodSymbol() & 0xff) == (byEncryptionMethod & 0xff))
{
return oENCRID3V2Frame.getEncryptionData();
}
}
return null;
|
public AENCID3V2Frame[] | getAENCFrames()Get all AENC frames stored in this tag.
return (AENCID3V2Frame[])m_oAENCOwnerIdentifierToFrameMap.values().toArray(new AENCID3V2Frame[0]);
|
public APICID3V2Frame[] | getAPICFrames()Get all APIC frames stored in this tag.
return (APICID3V2Frame[])m_oAPICDescriptionToFrameMap.values().toArray(new APICID3V2Frame[0]);
|
public java.lang.String | getAlbum()
TALBTextInformationID3V2Frame oTALB = this.getTALBTextInformationFrame();
if (oTALB != null)
{
return oTALB.getAlbum();
}
else
{
return null;
}
|
private ID3V2Frame[] | getAllFrames()Get all of the frame stored in this tag, in one array.
List oFrameList = new ArrayList();
oFrameList.addAll(m_oFrameIdToFrameMap.values());
oFrameList.addAll(m_oAENCOwnerIdentifierToFrameMap.values());
oFrameList.addAll(m_oAPICDescriptionToFrameMap.values());
oFrameList.addAll(m_oCOMMLanguageAndContentDescriptorToFrameMap.values());
oFrameList.addAll(m_oENCRMethodToFrameMap.values());
oFrameList.addAll(m_oGEOBContentDescriptorToFrameMap.values());
oFrameList.addAll(m_oGRIDGroupSymbolToFrameMap.values());
oFrameList.addAll(m_oLINKContentsToFrameMap.values());
oFrameList.addAll(m_oPRIVContentsToFrameMap.values());
oFrameList.addAll(m_oPOPMEmailToFrameMap.values());
oFrameList.addAll(m_oSYLTLanguageAndContentDescriptorToFrameMap.values());
oFrameList.addAll(m_oTXXXDescriptionToFrameMap.values());
oFrameList.addAll(m_oUFIDOwnerIdentifierToFrameMap.values());
oFrameList.addAll(m_oUSLTLanguageAndContentDescriptorToFrameMap.values());
oFrameList.addAll(m_oWCOMUrlToFrameMap.values());
oFrameList.addAll(m_oWOARUrlToFrameMap.values());
oFrameList.addAll(m_oWXXXDescriptionToFrameMap.values());
return (ID3V2Frame[])oFrameList.toArray(new ID3V2Frame[0]);
|
public java.lang.String | getArtist()
TPE1TextInformationID3V2Frame oTPE1 = this.getTPE1TextInformationFrame();
if (oTPE1 != null)
{
// build artist string from result (will probably not need combining, if convenience methods only used)
String sArtist = "";
String[] asLeadPerformer = oTPE1.getLeadPerformers();
for (int i=0; i < asLeadPerformer.length-1; i++)
{
sArtist += asLeadPerformer[i] + "/";
}
sArtist += asLeadPerformer[asLeadPerformer.length-1];
return sArtist;
}
else
{
return null;
}
|
public COMMID3V2Frame[] | getCOMMFrames()Get all COMM frames stored in this tag.
return (COMMID3V2Frame[])m_oCOMMLanguageAndContentDescriptorToFrameMap.values().toArray(new COMMID3V2Frame[0]);
|
public COMRID3V2Frame | getCOMRFrame()Get the COMR frame set in this tag.
return (COMRID3V2Frame)m_oFrameIdToFrameMap.get("COMR");
|
public java.lang.String | getComment()
COMMID3V2Frame oCOMM = null;
COMMID3V2Frame[] aoCOMM = this.getCOMMFrames();
for (int i=0; i < aoCOMM.length; i++)
{
if (aoCOMM[i].getShortDescription().equals(""))
{
oCOMM = aoCOMM[i];
}
}
if (oCOMM != null)
{
return oCOMM.getActualText();
}
else
{
return null;
}
|
public ENCRID3V2Frame[] | getENCRFrames()Get all ENCR frames stored in this tag.
return (ENCRID3V2Frame[])m_oENCRMethodToFrameMap.values().toArray(new ENCRID3V2Frame[0]);
|
public EQUAID3V2Frame | getEQUAFrame()Get the EQUA frame set in this tag.
return (EQUAID3V2Frame)m_oFrameIdToFrameMap.get("EQUA");
|
public ETCOID3V2Frame | getETCOFrame()Get the ETCO frame set in this tag.
return (ETCOID3V2Frame)m_oFrameIdToFrameMap.get("ETCO");
|
public EncryptedID3V2Frame[] | getEncryptedFrames()Get all encrypted frames in this tag. These are frames which could not be decrypted.
return (EncryptedID3V2Frame[])m_oEncryptedFrameList.toArray(new EncryptedID3V2Frame[0]);
|
public GEOBID3V2Frame[] | getGEOBFrames()Get all GEOB frames stored in this tag.
return (GEOBID3V2Frame[])m_oGEOBContentDescriptorToFrameMap.values().toArray(new GEOBID3V2Frame[0]);
|
public GRIDID3V2Frame[] | getGRIDFrames()Get all GRID frames stored in this tag.
return (GRIDID3V2Frame[])m_oGRIDGroupSymbolToFrameMap.values().toArray(new GRIDID3V2Frame[0]);
|
public java.lang.String | getGenre()
TCONTextInformationID3V2Frame oTCON = this.getTCONTextInformationFrame();
if (oTCON != null)
{
return oTCON.getContentType().toString();
}
else
{
return null;
}
|
public IPLSID3V2Frame | getIPLSFrame()Get the IPLS frame set in this tag.
return (IPLSID3V2Frame)m_oFrameIdToFrameMap.get("IPLS");
|
public LINKID3V2Frame[] | getLINKFrames()Get all LINK frames stored in this tag.
return (LINKID3V2Frame[])m_oLINKContentsToFrameMap.values().toArray(new LINKID3V2Frame[0]);
|
public MCDIID3V2Frame | getMCDIFrame()Get the MCDI frame set in this tag.
return (MCDIID3V2Frame)m_oFrameIdToFrameMap.get("MCDI");
|
public MLLTID3V2Frame | getMLLTFrame()Get the MLLT frame set in this tag.
return (MLLTID3V2Frame)m_oFrameIdToFrameMap.get("MLLT");
|
public OWNEID3V2Frame | getOWNEFrame()Get the OWNE frame set in this tag.
return (OWNEID3V2Frame)m_oFrameIdToFrameMap.get("OWNE");
|
public PCNTID3V2Frame | getPCNTFrame()Get the PCNT frame set in this tag.
return (PCNTID3V2Frame)m_oFrameIdToFrameMap.get("PCNT");
|
public POPMID3V2Frame[] | getPOPMFrames()Get all POPM frames stored in this tag.
return (POPMID3V2Frame[])m_oPOPMEmailToFrameMap.values().toArray(new POPMID3V2Frame[0]);
|
public POSSID3V2Frame | getPOSSFrame()Get the POSS frame set in this tag.
return (POSSID3V2Frame)m_oFrameIdToFrameMap.get("POSS");
|
public PRIVID3V2Frame[] | getPRIVFrames()Get all PRIV frames stored in this tag.
return (PRIVID3V2Frame[])m_oPRIVContentsToFrameMap.values().toArray(new PRIVID3V2Frame[0]);
|
public RBUFID3V2Frame | getRBUFFrame()Get the RBUF frame set in this tag.
return (RBUFID3V2Frame)m_oFrameIdToFrameMap.get("RBUF");
|
public RVADID3V2Frame | getRVADFrame()Get the RVAD frame set in this tag.
return (RVADID3V2Frame)m_oFrameIdToFrameMap.get("RVAD");
|
public RVRBID3V2Frame | getRVRBFrame()Get the RVRB frame set in this tag.
return (RVRBID3V2Frame)m_oFrameIdToFrameMap.get("RVRB");
|
public SYLTID3V2Frame[] | getSYLTFrames()Get all SYLT frames stored in this tag.
return (SYLTID3V2Frame[])m_oSYLTLanguageAndContentDescriptorToFrameMap.values().toArray(new SYLTID3V2Frame[0]);
|
public SYTCID3V2Frame | getSYTCFrame()Get the SYTC frame set in this tag.
return (SYTCID3V2Frame)m_oFrameIdToFrameMap.get("SYTC");
|
public TALBTextInformationID3V2Frame | getTALBTextInformationFrame()Get the TALB frame set in this tag.
return (TALBTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TALB");
|
public TBPMTextInformationID3V2Frame | getTBPMTextInformationFrame()Get the TBPM frame set in this tag.
return (TBPMTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TBPM");
|
public TCOMTextInformationID3V2Frame | getTCOMTextInformationFrame()Get the TCOM frame set in this tag.
return (TCOMTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TCOM");
|
public TCONTextInformationID3V2Frame | getTCONTextInformationFrame()Get the TCON frame set in this tag.
return (TCONTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TCON");
|
public TCOPTextInformationID3V2Frame | getTCOPTextInformationFrame()Get the TCOP frame set in this tag.
return (TCOPTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TCOP");
|
public TDATTextInformationID3V2Frame | getTDATTextInformationFrame()Get the TDAT frame set in this tag.
return (TDATTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TDAT");
|
public TDLYTextInformationID3V2Frame | getTDLYTextInformationFrame()Get the TDLY frame set in this tag.
return (TDLYTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TDLY");
|
public TENCTextInformationID3V2Frame | getTENCTextInformationFrame()Get the TEND frame set in this tag.
return (TENCTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TENC");
|
public TEXTTextInformationID3V2Frame | getTEXTTextInformationFrame()Get the TEXT frame set in this tag.
return (TEXTTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TEXT");
|
public TFLTTextInformationID3V2Frame | getTFLTTextInformationFrame()Get the TFLT frame set in this tag.
return (TFLTTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TFLT");
|
public TIMETextInformationID3V2Frame | getTIMETextInformationFrame()Get the TIME frame set in this tag.
return (TIMETextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TIME");
|
public TIT1TextInformationID3V2Frame | getTIT1TextInformationFrame()Get the TIT1 frame set in this tag.
return (TIT1TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TIT1");
|
public TIT2TextInformationID3V2Frame | getTIT2TextInformationFrame()Get the TIT2 frame set in this tag.
return (TIT2TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TIT2");
|
public TIT3TextInformationID3V2Frame | getTIT3TextInformationFrame()Get the TIT3 frame set in this tag.
return (TIT3TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TIT3");
|
public TKEYTextInformationID3V2Frame | getTKEYTextInformationFrame()Get the TKEY frame set in this tag.
return (TKEYTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TKEY");
|
public TLANTextInformationID3V2Frame | getTLANTextInformationFrame()Get the TLAN frame set in this tag.
return (TLANTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TLAN");
|
public TLENTextInformationID3V2Frame | getTLENTextInformationFrame()Get the TLEN frame set in this tag.
return (TLENTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TLEN");
|
public TMEDTextInformationID3V2Frame | getTMEDTextInformationFrame()Get the TMED frame set in this tag.
return (TMEDTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TMED");
|
public TOALTextInformationID3V2Frame | getTOALTextInformationFrame()Get the TOAL frame set in this tag.
return (TOALTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TOAL");
|
public TOFNTextInformationID3V2Frame | getTOFNTextInformationFrame()Get the TOFN frame set in this tag.
return (TOFNTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TOFN");
|
public TOLYTextInformationID3V2Frame | getTOLYTextInformationFrame()Get the TOLY frame set in this tag.
return (TOLYTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TOLY");
|
public TOPETextInformationID3V2Frame | getTOPETextInformationFrame()Get the TOPE frame set in this tag.
return (TOPETextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TOPE");
|
public TORYTextInformationID3V2Frame | getTORYTextInformationFrame()Get the TORY frame set in this tag.
return (TORYTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TORY");
|
public TOWNTextInformationID3V2Frame | getTOWNTextInformationFrame()Get the TOWN frame set in this tag.
return (TOWNTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TOWN");
|
public TPE1TextInformationID3V2Frame | getTPE1TextInformationFrame()Get the TPE1 frame set in this tag.
return (TPE1TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TPE1");
|
public TPE2TextInformationID3V2Frame | getTPE2TextInformationFrame()Get the TPE2 frame set in this tag.
return (TPE2TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TPE2");
|
public TPE3TextInformationID3V2Frame | getTPE3TextInformationFrame()Get the TPE3 frame set in this tag.
return (TPE3TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TPE3");
|
public TPE4TextInformationID3V2Frame | getTPE4TextInformationFrame()Get the TPE4 frame set in this tag.
return (TPE4TextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TPE4");
|
public TPOSTextInformationID3V2Frame | getTPOSTextInformationFrame()Get the TPOS frame set in this tag.
return (TPOSTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TPOS");
|
public TPUBTextInformationID3V2Frame | getTPUBTextInformationFrame()Get the TPUB frame set in this tag.
return (TPUBTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TPUB");
|
public TRCKTextInformationID3V2Frame | getTRCKTextInformationFrame()Get the TRCK frame set in this tag.
return (TRCKTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TRCK");
|
public TRDATextInformationID3V2Frame | getTRDATextInformationFrame()Get the TRDA frame set in this tag.
return (TRDATextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TRDA");
|
public TRSNTextInformationID3V2Frame | getTRSNTextInformationFrame()Get the TRSN frame set in this tag.
return (TRSNTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TRSN");
|
public TRSOTextInformationID3V2Frame | getTRSOTextInformationFrame()Get the TRSO frame set in this tag.
return (TRSOTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TRSO");
|
public TSIZTextInformationID3V2Frame | getTSIZTextInformationFrame()Get the TSIZ frame set in this tag.
return (TSIZTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TSIZ");
|
public TSRCTextInformationID3V2Frame | getTSRCTextInformationFrame()Get the TSRC frame set in this tag.
return (TSRCTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TSRC");
|
public TSSETextInformationID3V2Frame | getTSSETextInformationFrame()Get the TSSE frame set in this tag.
return (TSSETextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TSSE");
|
public TXXXTextInformationID3V2Frame[] | getTXXXTextInformationFrames()Get all TXXX frames stored in this tag.
return (TXXXTextInformationID3V2Frame[])m_oTXXXDescriptionToFrameMap.values().toArray(new TXXXTextInformationID3V2Frame[0]);
|
public TYERTextInformationID3V2Frame | getTYERTextInformationFrame()Get the TYER frame set in this tag.
return (TYERTextInformationID3V2Frame)m_oFrameIdToFrameMap.get("TYER");
|
public java.lang.String | getTitle()
TIT2TextInformationID3V2Frame oTIT2 = this.getTIT2TextInformationFrame();
if (oTIT2 != null)
{
return oTIT2.getTitle();
}
else
{
return null;
}
|
public int | getTotalTracks()
TRCKTextInformationID3V2Frame oTRCK = this.getTRCKTextInformationFrame();
if (oTRCK != null)
{
return oTRCK.getTotalTracks();
}
else
{
throw new ID3Exception("No total tracks number has been set.");
}
|
public int | getTrackNumber()
TRCKTextInformationID3V2Frame oTRCK = this.getTRCKTextInformationFrame();
if (oTRCK != null)
{
return oTRCK.getTrackNumber();
}
else
{
throw new ID3Exception("No track number has been set.");
}
|
public UFIDID3V2Frame[] | getUFIDFrames()Get all UFID frames stored in this tag.
return (UFIDID3V2Frame[])m_oUFIDOwnerIdentifierToFrameMap.values().toArray(new UFIDID3V2Frame[0]);
|
public USERID3V2Frame | getUSERFrame()Get the USER frame set in this tag.
return (USERID3V2Frame)m_oFrameIdToFrameMap.get("USER");
|
public USLTID3V2Frame[] | getUSLTFrames()Get all USLT frames stored in this tag.
return (USLTID3V2Frame[])m_oUSLTLanguageAndContentDescriptorToFrameMap.values().toArray(new USLTID3V2Frame[0]);
|
public UnknownID3V2Frame[] | getUnknownFrames()Get all unknown frames in this tag. These are all frames which are not defined in the ID3 v2.3.0 spec.
return (UnknownID3V2Frame[])m_oUnknownFrameList.toArray(new UnknownID3V2Frame[0]);
|
public WCOMUrlLinkID3V2Frame[] | getWCOMUrlLinkFrames()Get all WCOM frames stored in this tag.
return (WCOMUrlLinkID3V2Frame[])m_oWCOMUrlToFrameMap.values().toArray(new WCOMUrlLinkID3V2Frame[0]);
|
public WCOPUrlLinkID3V2Frame | getWCOPUrlLinkFrame()Get the WCOP frame set in this tag.
return (WCOPUrlLinkID3V2Frame)m_oFrameIdToFrameMap.get("WCOP");
|
public WOAFUrlLinkID3V2Frame | getWOAFUrlLinkFrame()Get the WOAF frame set in this tag.
return (WOAFUrlLinkID3V2Frame)m_oFrameIdToFrameMap.get("WOAF");
|
public WOARUrlLinkID3V2Frame[] | getWOARUrlLinkFrames()Get all WOAR frames stored in this tag.
return (WOARUrlLinkID3V2Frame[])m_oWOARUrlToFrameMap.values().toArray(new WOARUrlLinkID3V2Frame[0]);
|
public WOASUrlLinkID3V2Frame | getWOASUrlLinkFrame()Get the WOAS frame set in this tag.
return (WOASUrlLinkID3V2Frame)m_oFrameIdToFrameMap.get("WOAS");
|
public WORSUrlLinkID3V2Frame | getWORSUrlLinkFrame()Get the WORS frame set in this tag.
return (WORSUrlLinkID3V2Frame)m_oFrameIdToFrameMap.get("WORS");
|
public WPAYUrlLinkID3V2Frame | getWPAYUrlLinkFrame()Get the WPAY frame set in this tag.
return (WPAYUrlLinkID3V2Frame)m_oFrameIdToFrameMap.get("WPAY");
|
public WPUBUrlLinkID3V2Frame | getWPUBUrlLinkFrame()Get the WPUB frame set in this tag.
return (WPUBUrlLinkID3V2Frame)m_oFrameIdToFrameMap.get("WPUB");
|
public WXXXUrlLinkID3V2Frame[] | getWXXXUrlLinkFrames()Get all WXXX frames stored in this tag.
return (WXXXUrlLinkID3V2Frame[])m_oWXXXDescriptionToFrameMap.values().toArray(new WXXXUrlLinkID3V2Frame[0]);
|
public int | getYear()
TYERTextInformationID3V2Frame oTYER = this.getTYERTextInformationFrame();
if (oTYER != null)
{
return oTYER.getYear();
}
else
{
throw new ID3Exception("No year has been set.");
}
|
static ID3V2Tag | internalRead(ID3DataInputStream oID3DIS)Internal method to read a tag from an input stream.
ArrayList oEncryptedFrameList = new ArrayList();
try
{
// read flags
int iFlags = oID3DIS.readUnsignedByte();
boolean bUnsynchronizationUsedFlag = ((iFlags & 0x80) != 0);
boolean bExtendedHeaderFlag = ((iFlags & 0x40) != 0);
boolean bExperimentalFlag = ((iFlags & 0x20) != 0);
if ((iFlags & 0x1f) > 0)
{
// we are supposed to fail if any unknown flags are encountered
throw new ID3Exception("Encountered unknown header flags.");
}
// read tag size
int iTagSize = oID3DIS.readID3Four();
// if extended header exists, read it
boolean bCRCFlag = false;
long lExpectedCRCValue = 0;
int iSizeOfPadding = 0;
if (bExtendedHeaderFlag)
{
int iExtendedHeaderSize = oID3DIS.readBE32();
// fix tag size to not include extended header we're now reading, nor the four byte length of the
// extended header
iTagSize -= (iExtendedHeaderSize + 4);
if ((iExtendedHeaderSize != 6) && (iExtendedHeaderSize != 10))
{
throw new ID3Exception("Extended header size must be either 6 or 10 bytes. Read " + iExtendedHeaderSize + ".");
}
int iFlagOne = oID3DIS.readUnsignedByte();
int iFlagTwo = oID3DIS.readUnsignedByte();
// make sure there are no unknown flags set
if ( ((iFlagOne & 0x7f) != 0) || (iFlagTwo != 0) )
{
throw new ID3Exception("Extended header has unknown flags set.");
}
bCRCFlag = ((iFlagOne >> 7) != 0);
// read size of padding
iSizeOfPadding = oID3DIS.readBE32();
// read CRC data if provided
if (bCRCFlag)
{
lExpectedCRCValue = oID3DIS.readUnsignedBE32();
}
}
// create tag object
ID3V2_3_0Tag oID3V2_3_0Tag = new ID3V2_3_0Tag(bUnsynchronizationUsedFlag,
bExtendedHeaderFlag,
bExperimentalFlag);
// set CRC flag if in read tag
if (bCRCFlag)
{
oID3V2_3_0Tag.setCRC(bCRCFlag);
}
// read all frames into array
byte[] abyFrameData = new byte[iTagSize];
oID3DIS.readFully(abyFrameData);
// de-unsynchronize if necessary
if (bUnsynchronizationUsedFlag)
{
abyFrameData = ID3Util.deunsynchronize(abyFrameData);
}
// check CRC against frame data if specified
if (bCRCFlag)
{
CRC32 oCRC32 = new CRC32();
oCRC32.update(abyFrameData, 0, iTagSize - iSizeOfPadding);
long lCalculatedCRCValue = oCRC32.getValue();
//System.out.println("Expected CRC value = " + lExpectedCRCValue);
//System.out.println("Calculated CRC " + lCalculatedCRCValue + " on read bytes " + ID3Util.convertBytesToHexString(abyFrameData, true));
if (lExpectedCRCValue != lCalculatedCRCValue)
{
throw new ID3Exception("Expected and calculated CRC values for tag do not match.");
}
}
// read individual frames and store them
ByteArrayInputStream oFrameBAIS = new ByteArrayInputStream(abyFrameData);
ID3DataInputStream oFrameID3DIS = new ID3DataInputStream(oFrameBAIS);
int iPaddingLength = 0;
while (oFrameID3DIS.available() > 4)
{
try
{
ID3V2Frame oID3V2Frame = ID3V2Frame.read(oFrameID3DIS);
if (oID3V2Frame != null)
{
if (oID3V2Frame instanceof EncryptedID3V2Frame)
{
// store this encrypted frame for later (we have to do two passes.. because the encryption
// details may come after the encrypted frame, in the tag)
oEncryptedFrameList.add(oID3V2Frame);
}
else
{
storeID3V2Frame(oID3V2Frame, oID3V2_3_0Tag);
}
}
else
{
// we tried to read a tag and saw there wasn't one there, which means we read one byte of padding
iPaddingLength += 4;
break;
}
}
catch (ID3Exception ie)
{
// if we are using strict reading, then this exception gets rethrown, otherwise it is ignored
if (ie instanceof InvalidFrameID3Exception)
{
if (ID3Tag.usingStrict())
{
throw ie;
}
}
else
{
throw ie;
}
}
}
// all remaining bytes are padding (could be zero)
iPaddingLength += oFrameID3DIS.available();
// set padding length
oID3V2_3_0Tag.m_iPaddingLength = iPaddingLength;
// re-read encrypted frames that were saved (now that all ENCR frames in tag have been read)
Iterator oEncryptedFrameIter = oEncryptedFrameList.iterator();
while (oEncryptedFrameIter.hasNext())
{
EncryptedID3V2Frame oEncryptedID3V2Frame = (EncryptedID3V2Frame)oEncryptedFrameIter.next();
byte[] abyEncryptedData = oEncryptedID3V2Frame.getEncryptedData();
ByteArrayInputStream oEncBAIS = new ByteArrayInputStream(abyEncryptedData);
ID3DataInputStream oEncID3DIS = new ID3DataInputStream(oEncBAIS);
ID3V2Frame oID3V2Frame = ID3V2Frame.read(oEncID3DIS, oID3V2_3_0Tag.getENCRFrames());
if ( ! (oID3V2Frame instanceof EncryptedID3V2Frame) )
{
// we were able to decrypt the frame this time, so remove it from the encrypted frame list
oEncryptedFrameIter.remove();
// and add the decrypted frame to the tag
storeID3V2Frame(oID3V2Frame, oID3V2_3_0Tag);
}
else
{
// save this encrypted frame as is
oID3V2_3_0Tag.m_oEncryptedFrameList.add(oID3V2Frame);
}
}
return oID3V2_3_0Tag;
}
catch (ID3Exception e)
{
throw e;
}
catch (Exception e)
{
throw new ID3Exception("Error reading tag.", e);
}
|
public AENCID3V2Frame | removeAENCFrame(java.lang.String sOwnerIdentifier)Remove a specific AENC frame from this tag.
if (sOwnerIdentifier == null)
{
throw new NullPointerException("Owner identifier is null.");
}
AENCID3V2Frame oAENC = (AENCID3V2Frame)m_oAENCOwnerIdentifierToFrameMap.remove(sOwnerIdentifier);
if (oAENC != null)
{
oAENC.removeID3Observer(this);
}
return oAENC;
|
public APICID3V2Frame | removeAPICFrame(java.lang.String sDescription)Remove a specific APIC frame from this tag.
if (sDescription == null)
{
throw new NullPointerException("Description is null.");
}
APICID3V2Frame oAPIC = (APICID3V2Frame)m_oAPICDescriptionToFrameMap.remove(sDescription);
if (oAPIC != null)
{
oAPIC.removeID3Observer(this);
}
return oAPIC;
|
public COMMID3V2Frame | removeCOMMFrame(java.lang.String sLanguage, java.lang.String sShortDescription)Remove a specific COMM frame from this tag.
if (sLanguage == null)
{
throw new NullPointerException("Language is null.");
}
if (sShortDescription == null)
{
sShortDescription = "";
}
COMMID3V2Frame oCOMM = (COMMID3V2Frame)m_oCOMMLanguageAndContentDescriptorToFrameMap.remove(sLanguage + sShortDescription);
if (oCOMM != null)
{
oCOMM.removeID3Observer(this);
}
return oCOMM;
|
public COMRID3V2Frame | removeCOMRFrame()Remove the COMR frame which was set in this tag.
COMRID3V2Frame oCOMR = (COMRID3V2Frame)m_oFrameIdToFrameMap.remove("COMR");
if (oCOMR != null)
{
oCOMR.removeID3Observer(this);
}
return oCOMR;
|
public ENCRID3V2Frame | removeENCRFrame(byte byEncryptionMethodSymbol)Remove a specific ENCR frame from this tag.
ENCRID3V2Frame oENCR = (ENCRID3V2Frame)m_oENCRMethodToFrameMap.remove(new Byte(byEncryptionMethodSymbol));
if (oENCR != null)
{
oENCR.removeID3Observer(this);
}
return oENCR;
|
public EQUAID3V2Frame | removeEQUAFrame()Remove the EQUA frame which was set in this tag.
EQUAID3V2Frame oEQUA = (EQUAID3V2Frame)m_oFrameIdToFrameMap.remove("EQUA");
if (oEQUA != null)
{
oEQUA.removeID3Observer(this);
}
return oEQUA;
|
public ETCOID3V2Frame | removeETCOFrame()Remove the ETCO frame which was set in this tag.
ETCOID3V2Frame oETCO = (ETCOID3V2Frame)m_oFrameIdToFrameMap.remove("ETCO");
if (oETCO != null)
{
oETCO.removeID3Observer(this);
}
return oETCO;
|
public GEOBID3V2Frame | removeGEOBFrame(java.lang.String sContentDescriptor)Remove a specific GEOB frame from this tag.
if (sContentDescriptor == null)
{
throw new NullPointerException("Content descriptor is null.");
}
GEOBID3V2Frame oGEOB = (GEOBID3V2Frame)m_oGEOBContentDescriptorToFrameMap.remove(sContentDescriptor);
if (oGEOB != null)
{
oGEOB.removeID3Observer(this);
}
return oGEOB;
|
public GRIDID3V2Frame | removeGRIDFrame(byte byGroupSymbol)Remove a specific GRID frame from this tag.
GRIDID3V2Frame oGRID = (GRIDID3V2Frame)m_oGRIDGroupSymbolToFrameMap.remove(new Byte(byGroupSymbol));
if (oGRID != null)
{
oGRID.removeID3Observer(this);
}
return oGRID;
|
public IPLSID3V2Frame | removeIPLSFrame()Remove the IPLS frame which was set in this tag.
IPLSID3V2Frame oIPLS = (IPLSID3V2Frame)m_oFrameIdToFrameMap.remove("IPLS");
if (oIPLS != null)
{
oIPLS.removeID3Observer(this);
}
return oIPLS;
|
public LINKID3V2Frame | removeLINKFrame(byte[] abyFrameIdentifier, java.lang.String sLinkUrl, java.lang.String sAdditionalData)Remove a specific LINK frame from this tag.
String sContents = new String(abyFrameIdentifier) + sLinkUrl + sAdditionalData;
LINKID3V2Frame oLINK = (LINKID3V2Frame)m_oLINKContentsToFrameMap.remove(sContents);
if (oLINK != null)
{
oLINK.removeID3Observer(this);
}
return oLINK;
|
public MCDIID3V2Frame | removeMCDIFrame()Remove the MCDI frame which was set in this tag.
MCDIID3V2Frame oMCDI = (MCDIID3V2Frame)m_oFrameIdToFrameMap.remove("MCDI");
if (oMCDI != null)
{
oMCDI.removeID3Observer(this);
}
return oMCDI;
|
public MLLTID3V2Frame | removeMLLTFrame()Remove the MLLT frame which was set in this tag.
MLLTID3V2Frame oMLLT = (MLLTID3V2Frame)m_oFrameIdToFrameMap.remove("MLLT");
if (oMLLT != null)
{
oMLLT.removeID3Observer(this);
}
return oMLLT;
|
public OWNEID3V2Frame | removeOWNEFrame()Remove the OWNE frame which was set in this tag.
OWNEID3V2Frame oOWNE = (OWNEID3V2Frame)m_oFrameIdToFrameMap.remove("OWNE");
if (oOWNE != null)
{
oOWNE.removeID3Observer(this);
}
return oOWNE;
|
public PCNTID3V2Frame | removePCNTFrame()Remove the PCNT frame which was set in this tag.
PCNTID3V2Frame oPCNT = (PCNTID3V2Frame)m_oFrameIdToFrameMap.remove("PCNT");
if (oPCNT != null)
{
oPCNT.removeID3Observer(this);
}
return oPCNT;
|
public POPMID3V2Frame | removePOPMFrame(java.lang.String sEmailToUser)Remove a specific POPM frame from this tag.
POPMID3V2Frame oPOPM = (POPMID3V2Frame)m_oPOPMEmailToFrameMap.remove(sEmailToUser);
if (oPOPM != null)
{
oPOPM.removeID3Observer(this);
}
return oPOPM;
|
public POSSID3V2Frame | removePOSSFrame()Remove the POSS frame which was set in this tag.
POSSID3V2Frame oPOSS = (POSSID3V2Frame)m_oFrameIdToFrameMap.remove("POSS");
if (oPOSS != null)
{
oPOSS.removeID3Observer(this);
}
return oPOSS;
|
public PRIVID3V2Frame | removePRIVFrame(java.lang.String sOwnerIdentifier, byte[] abyPrivateData)Remove a specific PRIV frame from this tag.
// get an MD5 hash of the private data, which we'll use as part of the key in our frame map
String sHash = null;
try
{
MessageDigest oMD = MessageDigest.getInstance("MD5");
oMD.update(abyPrivateData);
byte[] abyDigest = oMD.digest();
sHash = ID3Util.convertBytesToHexString(abyDigest, false);
}
catch (Exception e)
{
throw new ID3Exception("Error hashing private data.", e);
}
String sContents = sOwnerIdentifier + sHash;
PRIVID3V2Frame oPRIV = (PRIVID3V2Frame)m_oPRIVContentsToFrameMap.remove(sContents);
if (oPRIV != null)
{
oPRIV.removeID3Observer(this);
}
return oPRIV;
|
public RBUFID3V2Frame | removeRBUFFrame()Remove the RBUF frame which was set in this tag.
RBUFID3V2Frame oRBUF = (RBUFID3V2Frame)m_oFrameIdToFrameMap.remove("RBUF");
if (oRBUF != null)
{
oRBUF.removeID3Observer(this);
}
return oRBUF;
|
public RVADID3V2Frame | removeRVADFrame()Remove the RVAD frame which was set in this tag.
RVADID3V2Frame oRVAD = (RVADID3V2Frame)m_oFrameIdToFrameMap.remove("RVAD");
if (oRVAD != null)
{
oRVAD.removeID3Observer(this);
}
return oRVAD;
|
public RVRBID3V2Frame | removeRVRBFrame()Remove the RVRB frame which was set in this tag.
RVRBID3V2Frame oRVRB = (RVRBID3V2Frame)m_oFrameIdToFrameMap.remove("RVRB");
if (oRVRB != null)
{
oRVRB.removeID3Observer(this);
}
return oRVRB;
|
public SYLTID3V2Frame | removeSYLTFrame(java.lang.String sLanguage, java.lang.String sShortDescription)Remove a specific SYLT frame from this tag.
if (sLanguage == null)
{
throw new NullPointerException("Language is null.");
}
if (sShortDescription == null)
{
throw new NullPointerException("Short description is null.");
}
SYLTID3V2Frame oSYLT = (SYLTID3V2Frame)m_oSYLTLanguageAndContentDescriptorToFrameMap.remove(sLanguage + sShortDescription);
if (oSYLT != null)
{
oSYLT.removeID3Observer(this);
}
return oSYLT;
|
public SYTCID3V2Frame | removeSYTCFrame()Remove the SYTC frame which was set in this tag.
SYTCID3V2Frame oSYTC = (SYTCID3V2Frame)m_oFrameIdToFrameMap.remove("SYTC");
if (oSYTC != null)
{
oSYTC.removeID3Observer(this);
}
return oSYTC;
|
public TALBTextInformationID3V2Frame | removeTALBTextInformationFrame()Remove the TALB frame which was set in this tag.
TALBTextInformationID3V2Frame oTALB = (TALBTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TALB");
if (oTALB != null)
{
oTALB.removeID3Observer(this);
}
return oTALB;
|
public TBPMTextInformationID3V2Frame | removeTBPMTextInformationFrame()Remove the TBPM frame which was set in this tag.
TBPMTextInformationID3V2Frame oTBPM = (TBPMTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TBPM");
if (oTBPM != null)
{
oTBPM.removeID3Observer(this);
}
return oTBPM;
|
public TCOMTextInformationID3V2Frame | removeTCOMTextInformationFrame()Remove the TCOM frame which was set in this tag.
TCOMTextInformationID3V2Frame oTCOM = (TCOMTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TCOM");
if (oTCOM != null)
{
oTCOM.removeID3Observer(this);
}
return oTCOM;
|
public TCONTextInformationID3V2Frame | removeTCONTextInformationFrame()Remove the TCON frame which was set in this tag.
TCONTextInformationID3V2Frame oTCON = (TCONTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TCON");
if (oTCON != null)
{
oTCON.removeID3Observer(this);
}
return oTCON;
|
public TCOPTextInformationID3V2Frame | removeTCOPTextInformationFrame()Remove the TCOP frame which was set in this tag.
TCOPTextInformationID3V2Frame oTCOP = (TCOPTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TCOP");
if (oTCOP != null)
{
oTCOP.removeID3Observer(this);
}
return oTCOP;
|
public TDATTextInformationID3V2Frame | removeTDATTextInformationFrame()Remove the TDAT frame which was set in this tag.
TDATTextInformationID3V2Frame oTDAT = (TDATTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TDAT");
if (oTDAT != null)
{
oTDAT.removeID3Observer(this);
}
return oTDAT;
|
public TDLYTextInformationID3V2Frame | removeTDLYTextInformationFrame()Remove the TDLY frame which was set in this tag.
TDLYTextInformationID3V2Frame oTDLY = (TDLYTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TDLY");
if (oTDLY != null)
{
oTDLY.removeID3Observer(this);
}
return oTDLY;
|
public TENCTextInformationID3V2Frame | removeTENCTextInformationFrame()Remove the TENC frame which was set in this tag.
TENCTextInformationID3V2Frame oTENC = (TENCTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TENC");
if (oTENC != null)
{
oTENC.removeID3Observer(this);
}
return oTENC;
|
public TEXTTextInformationID3V2Frame | removeTEXTTextInformationFrame()Remove the TEXT frame which was set in this tag.
TEXTTextInformationID3V2Frame oTEXT = (TEXTTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TEXT");
if (oTEXT != null)
{
oTEXT.removeID3Observer(this);
}
return oTEXT;
|
public TFLTTextInformationID3V2Frame | removeTFLTTextInformationFrame()Remove the TFLT frame which was set in this tag.
TFLTTextInformationID3V2Frame oTFLT = (TFLTTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TFLT");
if (oTFLT != null)
{
oTFLT.removeID3Observer(this);
}
return oTFLT;
|
public TIMETextInformationID3V2Frame | removeTIMETextInformationFrame()Remove the TIME frame which was set in this tag.
TIMETextInformationID3V2Frame oTIME = (TIMETextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TIME");
if (oTIME != null)
{
oTIME.removeID3Observer(this);
}
return oTIME;
|
public TIT1TextInformationID3V2Frame | removeTIT1TextInformationFrame()Remove the TIT1 frame which was set in this tag.
TIT1TextInformationID3V2Frame oTIT1 = (TIT1TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TIT1");
if (oTIT1 != null)
{
oTIT1.removeID3Observer(this);
}
return oTIT1;
|
public TIT2TextInformationID3V2Frame | removeTIT2TextInformationFrame()Remove the TIT2 frame which was set in this tag.
TIT2TextInformationID3V2Frame oTIT2 = (TIT2TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TIT2");
if (oTIT2 != null)
{
oTIT2.removeID3Observer(this);
}
return oTIT2;
|
public TIT3TextInformationID3V2Frame | removeTIT3TextInformationFrame()Remove the TIT3 frame which was set in this tag.
TIT3TextInformationID3V2Frame oTIT3 = (TIT3TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TIT3");
if (oTIT3 != null)
{
oTIT3.removeID3Observer(this);
}
return oTIT3;
|
public TKEYTextInformationID3V2Frame | removeTKEYTextInformationFrame()Remove the TKEY frame which was set in this tag.
TKEYTextInformationID3V2Frame oTKEY = (TKEYTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TKEY");
if (oTKEY != null)
{
oTKEY.removeID3Observer(this);
}
return oTKEY;
|
public TLANTextInformationID3V2Frame | removeTLANTextInformationFrame()Remove the TLAN frame which was set in this tag.
TLANTextInformationID3V2Frame oTLAN = (TLANTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TLAN");
if (oTLAN != null)
{
oTLAN.removeID3Observer(this);
}
return oTLAN;
|
public TLENTextInformationID3V2Frame | removeTLENTextInformationFrame()Remove the TLEN frame which was set in this tag.
TLENTextInformationID3V2Frame oTLEN = (TLENTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TLEN");
if (oTLEN != null)
{
oTLEN.removeID3Observer(this);
}
return oTLEN;
|
public TMEDTextInformationID3V2Frame | removeTMEDTextInformationFrame()Remove the TMED frame which was set in this tag.
TMEDTextInformationID3V2Frame oTMED = (TMEDTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TMED");
if (oTMED != null)
{
oTMED.removeID3Observer(this);
}
return oTMED;
|
public TOALTextInformationID3V2Frame | removeTOALTextInformationFrame()Remove the TOAL frame which was set in this tag.
TOALTextInformationID3V2Frame oTOAL = (TOALTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TOAL");
if (oTOAL != null)
{
oTOAL.removeID3Observer(this);
}
return oTOAL;
|
public TOFNTextInformationID3V2Frame | removeTOFNTextInformationFrame()Remove the TOFN frame which was set in this tag.
TOFNTextInformationID3V2Frame oTOFN = (TOFNTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TOFN");
if (oTOFN != null)
{
oTOFN.removeID3Observer(this);
}
return oTOFN;
|
public TOLYTextInformationID3V2Frame | removeTOLYTextInformationFrame()Remove the TOLY frame which was set in this tag.
TOLYTextInformationID3V2Frame oTOLY = (TOLYTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TOLY");
if (oTOLY != null)
{
oTOLY.removeID3Observer(this);
}
return oTOLY;
|
public TOPETextInformationID3V2Frame | removeTOPETextInformationFrame()Remove the TOPE frame which was set in this tag.
TOPETextInformationID3V2Frame oTOPE = (TOPETextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TOPE");
if (oTOPE != null)
{
oTOPE.removeID3Observer(this);
}
return oTOPE;
|
public TORYTextInformationID3V2Frame | removeTORYTextInformationFrame()Remove the TORY frame which was set in this tag.
TORYTextInformationID3V2Frame oTORY = (TORYTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TORY");
if (oTORY != null)
{
oTORY.removeID3Observer(this);
}
return oTORY;
|
public TOWNTextInformationID3V2Frame | removeTOWNTextInformationFrame()Remove the TOWN frame which was set in this tag.
TOWNTextInformationID3V2Frame oTOWN = (TOWNTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TOWN");
if (oTOWN != null)
{
oTOWN.removeID3Observer(this);
}
return oTOWN;
|
public TPE1TextInformationID3V2Frame | removeTPE1TextInformationFrame()Remove the TPE1 frame which was set in this tag.
TPE1TextInformationID3V2Frame oTPE1 = (TPE1TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TPE1");
if (oTPE1 != null)
{
oTPE1.removeID3Observer(this);
}
return oTPE1;
|
public TPE2TextInformationID3V2Frame | removeTPE2TextInformationFrame()Remove the TPE2 frame which was set in this tag.
TPE2TextInformationID3V2Frame oTPE2 = (TPE2TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TPE2");
if (oTPE2 != null)
{
oTPE2.removeID3Observer(this);
}
return oTPE2;
|
public TPE3TextInformationID3V2Frame | removeTPE3TextInformationFrame()Remove the TPE3 frame which was set in this tag.
TPE3TextInformationID3V2Frame oTPE3 = (TPE3TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TPE3");
if (oTPE3 != null)
{
oTPE3.removeID3Observer(this);
}
return oTPE3;
|
public TPE4TextInformationID3V2Frame | removeTPE4TextInformationFrame()Remove the TPE4 frame which was set in this tag.
TPE4TextInformationID3V2Frame oTPE4 = (TPE4TextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TPE4");
if (oTPE4 != null)
{
oTPE4.removeID3Observer(this);
}
return oTPE4;
|
public TPOSTextInformationID3V2Frame | removeTPOSTextInformationFrame()Remove the TPOS frame which was set in this tag.
TPOSTextInformationID3V2Frame oTPOS = (TPOSTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TPOS");
if (oTPOS != null)
{
oTPOS.removeID3Observer(this);
}
return oTPOS;
|
public TPUBTextInformationID3V2Frame | removeTPUBTextInformationFrame()Remove the TPUB frame which was set in this tag.
TPUBTextInformationID3V2Frame oTPUB = (TPUBTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TPUB");
if (oTPUB != null)
{
oTPUB.removeID3Observer(this);
}
return oTPUB;
|
public TRCKTextInformationID3V2Frame | removeTRCKTextInformationFrame()Remove the TRCK frame which was set in this tag.
TRCKTextInformationID3V2Frame oTRCK = (TRCKTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TRCK");
if (oTRCK != null)
{
oTRCK.removeID3Observer(this);
}
return oTRCK;
|
public TRDATextInformationID3V2Frame | removeTRDATextInformationFrame()Remove the TRDA frame which was set in this tag.
TRDATextInformationID3V2Frame oTRDA = (TRDATextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TRDA");
if (oTRDA != null)
{
oTRDA.removeID3Observer(this);
}
return oTRDA;
|
public TRSNTextInformationID3V2Frame | removeTRSNTextInformationFrame()Remove the TRSN frame which was set in this tag.
TRSNTextInformationID3V2Frame oTRSN = (TRSNTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TRSN");
if (oTRSN != null)
{
oTRSN.removeID3Observer(this);
}
return oTRSN;
|
public TRSOTextInformationID3V2Frame | removeTRSOTextInformationFrame()Remove the TRSO frame which was set in this tag.
TRSOTextInformationID3V2Frame oTRSO = (TRSOTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TRSO");
if (oTRSO != null)
{
oTRSO.removeID3Observer(this);
}
return oTRSO;
|
public TSIZTextInformationID3V2Frame | removeTSIZTextInformationFrame()Remove the TSIZ frame which was set in this tag.
TSIZTextInformationID3V2Frame oTSIZ = (TSIZTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TSIZ");
if (oTSIZ != null)
{
oTSIZ.removeID3Observer(this);
}
return oTSIZ;
|
public TSRCTextInformationID3V2Frame | removeTSRCTextInformationFrame()Remove the TSRC frame which was set in this tag.
TSRCTextInformationID3V2Frame oTSRC = (TSRCTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TSRC");
if (oTSRC != null)
{
oTSRC.removeID3Observer(this);
}
return oTSRC;
|
public TSSETextInformationID3V2Frame | removeTSSETextInformationFrame()Remove the TSSE frame which was set in this tag.
TSSETextInformationID3V2Frame oTSSE = (TSSETextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TSSE");
if (oTSSE != null)
{
oTSSE.removeID3Observer(this);
}
return oTSSE;
|
public TXXXTextInformationID3V2Frame | removeTXXXTextInformationFrame(java.lang.String sDescription)Remove a specific TXXX frame from this tag.
if (sDescription == null)
{
throw new NullPointerException("Description is null.");
}
TXXXTextInformationID3V2Frame oTXXX = (TXXXTextInformationID3V2Frame)m_oTXXXDescriptionToFrameMap.remove(sDescription);
if (oTXXX != null)
{
oTXXX.removeID3Observer(this);
}
return oTXXX;
|
public TYERTextInformationID3V2Frame | removeTYERTextInformationFrame()Remove the TYER frame which was set in this tag.
TYERTextInformationID3V2Frame oTYER = (TYERTextInformationID3V2Frame)m_oFrameIdToFrameMap.remove("TYER");
if (oTYER != null)
{
oTYER.removeID3Observer(this);
}
return oTYER;
|
public UFIDID3V2Frame | removeUFIDFrame(java.lang.String sOwnerIdentifier)Remove a specific UFID frame from this tag.
if (sOwnerIdentifier == null)
{
throw new NullPointerException("Owner identifier is null.");
}
UFIDID3V2Frame oUFID = (UFIDID3V2Frame)m_oUFIDOwnerIdentifierToFrameMap.remove(sOwnerIdentifier);
if (oUFID != null)
{
oUFID.removeID3Observer(this);
}
return oUFID;
|
public USERID3V2Frame | removeUSERFrame()Remove the USER frame which was set in this tag.
USERID3V2Frame oUSER = (USERID3V2Frame)m_oFrameIdToFrameMap.remove("USER");
if (oUSER != null)
{
oUSER.removeID3Observer(this);
}
return oUSER;
|
public USLTID3V2Frame | removeUSLTFrame(java.lang.String sLanguage, java.lang.String sShortDescription)Remove a specific USLT frame from this tag.
if (sLanguage == null)
{
throw new NullPointerException("Language is null.");
}
if (sShortDescription == null)
{
throw new NullPointerException("Short description is null.");
}
USLTID3V2Frame oUSLT = (USLTID3V2Frame)m_oUSLTLanguageAndContentDescriptorToFrameMap.remove(sLanguage + sShortDescription);
if (oUSLT != null)
{
oUSLT.removeID3Observer(this);
}
return oUSLT;
|
public WCOMUrlLinkID3V2Frame | removeWCOMUrlLinkFrame(java.lang.String sCommercialInformationUrl)Remove a specific WCOM frame from this tag.
if (sCommercialInformationUrl == null)
{
throw new NullPointerException("Commercial information URL is null.");
}
WCOMUrlLinkID3V2Frame oWCOM = (WCOMUrlLinkID3V2Frame)m_oWCOMUrlToFrameMap.remove(sCommercialInformationUrl);
if (oWCOM != null)
{
oWCOM.removeID3Observer(this);
}
return oWCOM;
|
public WCOPUrlLinkID3V2Frame | removeWCOPUrlLinkFrame()Remove the WCOP frame which was set in this tag.
WCOPUrlLinkID3V2Frame oWCOP = (WCOPUrlLinkID3V2Frame)m_oFrameIdToFrameMap.remove("WCOP");
if (oWCOP != null)
{
oWCOP.removeID3Observer(this);
}
return oWCOP;
|
public WOAFUrlLinkID3V2Frame | removeWOAFUrlLinkFrame()Remove the WOAF frame which was set in this tag.
WOAFUrlLinkID3V2Frame oWOAF = (WOAFUrlLinkID3V2Frame)m_oFrameIdToFrameMap.remove("WOAF");
if (oWOAF != null)
{
oWOAF.removeID3Observer(this);
}
return oWOAF;
|
public WOARUrlLinkID3V2Frame | removeWOARUrlLinkFrame(java.lang.String sOfficialArtistWebPageUrl)Remove a specific WOAR frame from this tag.
if (sOfficialArtistWebPageUrl == null)
{
throw new NullPointerException("Official artist webpage URL is null.");
}
WOARUrlLinkID3V2Frame oWOAR = (WOARUrlLinkID3V2Frame)m_oWOARUrlToFrameMap.remove(sOfficialArtistWebPageUrl);
if (oWOAR != null)
{
oWOAR.removeID3Observer(this);
}
return oWOAR;
|
public WOASUrlLinkID3V2Frame | removeWOASUrlLinkFrame()Remove the WOAS frame which was set in this tag.
WOASUrlLinkID3V2Frame oWOAS = (WOASUrlLinkID3V2Frame)m_oFrameIdToFrameMap.remove("WOAS");
if (oWOAS != null)
{
oWOAS.removeID3Observer(this);
}
return oWOAS;
|
public WORSUrlLinkID3V2Frame | removeWORSUrlLinkFrame()Remove the WORS frame which was set in this tag.
WORSUrlLinkID3V2Frame oWORS = (WORSUrlLinkID3V2Frame)m_oFrameIdToFrameMap.remove("WORS");
if (oWORS != null)
{
oWORS.removeID3Observer(this);
}
return oWORS;
|
public WPAYUrlLinkID3V2Frame | removeWPAYUrlLinkFrame()Remove the WPAY frame which was set in this tag.
WPAYUrlLinkID3V2Frame oWPAY = (WPAYUrlLinkID3V2Frame)m_oFrameIdToFrameMap.remove("WPAY");
if (oWPAY != null)
{
oWPAY.removeID3Observer(this);
}
return oWPAY;
|
public WPUBUrlLinkID3V2Frame | removeWPUBUrlLinkFrame()Remove the WPUB frame which was set in this tag.
WPUBUrlLinkID3V2Frame oWPUB = (WPUBUrlLinkID3V2Frame)m_oFrameIdToFrameMap.remove("WPUB");
if (oWPUB != null)
{
oWPUB.removeID3Observer(this);
}
return oWPUB;
|
public WXXXUrlLinkID3V2Frame | removeWXXXUrlLinkFrame(java.lang.String sDescription)Remove a specific WXXX frame from this tag.
if (sDescription == null)
{
throw new NullPointerException("Description is null.");
}
WXXXUrlLinkID3V2Frame oWXXX = (WXXXUrlLinkID3V2Frame)m_oWXXXDescriptionToFrameMap.remove(sDescription);
if (oWXXX != null)
{
oWXXX.removeID3Observer(this);
}
return oWXXX;
|
public void | sanityCheck()Sanity check, to see if this frame is in a consistent state for writing. Specify encryption of a frame, without
a corresponding ENCR frame, or the registration of the encryption agent, will cause this check to fail, for example.
ID3V2Frame[] aoID3V2Frame = getAllFrames();
ENCRID3V2Frame[] aoENCR = getENCRFrames();
for (int i=0; i < aoID3V2Frame.length; i++)
{
ID3V2Frame oID3V2Frame = aoID3V2Frame[i];
if (oID3V2Frame.isEncrypted())
{
for (int j=0; j < aoENCR.length; j++)
{
if (oID3V2Frame.getEncryptionMethod() == aoENCR[j].getEncryptionMethodSymbol())
{
if (ID3Encryption.getInstance().lookupCryptoAgent(aoENCR[j].getOwnerIdentifier()) == null)
{
throw new ID3Exception("Tag sanity check failed. At least one encrypted " +
new String(oID3V2Frame.getFrameId()) + " frame requires agent [" +
aoENCR[j].getOwnerIdentifier() + "], which has not been registered.");
}
else
{
return;
}
}
}
throw new ID3Exception("Tag sanity check failed. At least one " + new String(oID3V2Frame.getFrameId()) +
" frame encrypted with method symbol " + oID3V2Frame.getEncryptionMethod() +
" does not have a matching ENCR frame to define the method.");
}
}
|
public void | setAlbum(java.lang.String sAlbum)
// remove any current frame
this.removeTALBTextInformationFrame();
// set new frame
this.setTALBTextInformationFrame(new TALBTextInformationID3V2Frame(sAlbum));
|
public void | setArtist(java.lang.String sArtist)
// remove any current frame
this.removeTPE1TextInformationFrame();
// set new frame
this.setTPE1TextInformationFrame(new TPE1TextInformationID3V2Frame(sArtist));
|
public COMRID3V2Frame | setCOMRFrame(COMRID3V2Frame oCOMRID3V2Frame)Set a commercial frame in this tag. Only a single COMR frame can be set in a tag.
if (oCOMRID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null COMR frame in tag.");
}
COMRID3V2Frame oCOMR = (COMRID3V2Frame)m_oFrameIdToFrameMap.put("COMR", oCOMRID3V2Frame);
// set this tag object up as a listener for changes to this frame
oCOMRID3V2Frame.addID3Observer(this);
try
{
oCOMRID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oCOMR != null)
{
oCOMR.removeID3Observer(this);
}
return oCOMR;
|
public void | setComment(java.lang.String sComment)
// remove any current comment
this.removeCOMMFrame("eng", null);
// set new frame
this.addCOMMFrame(new COMMID3V2Frame("eng", null, sComment));
|
public EQUAID3V2Frame | setEQUAFrame(EQUAID3V2Frame oEQUAID3V2Frame)Set a equalization frame in this tag. Only a single EQUA frame can be set in a tag.
if (oEQUAID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null EQUA frame in tag.");
}
EQUAID3V2Frame oEQUA = (EQUAID3V2Frame)m_oFrameIdToFrameMap.put("EQUA", oEQUAID3V2Frame);
// set this tag object up as a listener for changes to this frame
oEQUAID3V2Frame.addID3Observer(this);
try
{
oEQUAID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oEQUA != null)
{
oEQUA.removeID3Observer(this);
}
return oEQUA;
|
public ETCOID3V2Frame | setETCOFrame(ETCOID3V2Frame oETCOID3V2Frame)Set a event timing codes frame in this tag. Only a single ETCO frame can be set in a tag.
if (oETCOID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null ETCO frame in tag.");
}
ETCOID3V2Frame oETCO = (ETCOID3V2Frame)m_oFrameIdToFrameMap.put("ETCO", oETCOID3V2Frame);
// set this tag object up as a listener for changes to this frame
oETCOID3V2Frame.addID3Observer(this);
try
{
oETCOID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oETCO != null)
{
oETCO.removeID3Observer(this);
}
return oETCO;
|
public void | setGenre(java.lang.String sGenre)
// remove any current frame
this.removeTCONTextInformationFrame();
// set new frame
ContentType oContentType = new ContentType();
oContentType.setRefinement(sGenre);
this.setTCONTextInformationFrame(new TCONTextInformationID3V2Frame(oContentType));
|
public IPLSID3V2Frame | setIPLSFrame(IPLSID3V2Frame oIPLSID3V2Frame)Set an involved people list frame in this tag. Only a single IPLS frame can be set in a tag.
if (oIPLSID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null IPLS frame in tag.");
}
IPLSID3V2Frame oIPLS = (IPLSID3V2Frame)m_oFrameIdToFrameMap.put("IPLS", oIPLSID3V2Frame);
// set this tag object up as a listener for changes to this frame
oIPLSID3V2Frame.addID3Observer(this);
try
{
oIPLSID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oIPLS != null)
{
oIPLS.removeID3Observer(this);
}
return oIPLS;
|
public MCDIID3V2Frame | setMCDIFrame(MCDIID3V2Frame oMCDIID3V2Frame)Set a music CD identifier frame in this tag. Only a single MCDI frame can be set in a tag.
if (oMCDIID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null MCDI frame in tag.");
}
MCDIID3V2Frame oMCDI = (MCDIID3V2Frame)m_oFrameIdToFrameMap.put("MCDI", oMCDIID3V2Frame);
// set this tag object up as a listener for changes to this frame
oMCDIID3V2Frame.addID3Observer(this);
try
{
oMCDIID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oMCDI != null)
{
oMCDI.removeID3Observer(this);
}
return oMCDI;
|
public MLLTID3V2Frame | setMLLTFrame(MLLTID3V2Frame oMLLTID3V2Frame)Set an MPEG location lookup frame in this tag. Only a single MLLT frame can be set in a tag.
if (oMLLTID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null MLLT frame in tag.");
}
MLLTID3V2Frame oMLLT = (MLLTID3V2Frame)m_oFrameIdToFrameMap.put("MLLT", oMLLTID3V2Frame);
// set this tag object up as a listener for changes to this frame
oMLLTID3V2Frame.addID3Observer(this);
try
{
oMLLTID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oMLLT != null)
{
oMLLT.removeID3Observer(this);
}
return oMLLT;
|
public OWNEID3V2Frame | setOWNEFrame(OWNEID3V2Frame oOWNEID3V2Frame)Set an ownership frame in this tag. Only a single OWNE frame can be set in a tag.
if (oOWNEID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null OWNE frame in tag.");
}
OWNEID3V2Frame oOWNE = (OWNEID3V2Frame)m_oFrameIdToFrameMap.put("OWNE", oOWNEID3V2Frame);
// set this tag object up as a listener for changes to this frame
oOWNEID3V2Frame.addID3Observer(this);
try
{
oOWNEID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oOWNE != null)
{
oOWNE.removeID3Observer(this);
}
return oOWNE;
|
public PCNTID3V2Frame | setPCNTFrame(PCNTID3V2Frame oPCNTID3V2Frame)Set a play counter frame in this tag. Only a single PCNT frame can be set in a tag.
if (oPCNTID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null PCNT frame in tag.");
}
PCNTID3V2Frame oPCNT = (PCNTID3V2Frame)m_oFrameIdToFrameMap.put("PCNT", oPCNTID3V2Frame);
// set this tag object up as a listener for changes to this frame
oPCNTID3V2Frame.addID3Observer(this);
try
{
oPCNTID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oPCNT != null)
{
oPCNT.removeID3Observer(this);
}
return oPCNT;
|
public POSSID3V2Frame | setPOSSFrame(POSSID3V2Frame oPOSSID3V2Frame)Set a position synchronization frame in this tag. Only a single POSS frame can be set in a tag.
if (oPOSSID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null POSS frame in tag.");
}
POSSID3V2Frame oPOSS = (POSSID3V2Frame)m_oFrameIdToFrameMap.put("POSS", oPOSSID3V2Frame);
// set this tag object up as a listener for changes to this frame
oPOSSID3V2Frame.addID3Observer(this);
try
{
oPOSSID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oPOSS != null)
{
oPOSS.removeID3Observer(this);
}
return oPOSS;
|
public RBUFID3V2Frame | setRBUFFrame(RBUFID3V2Frame oRBUFID3V2Frame)Set a recommended buffer size frame in this tag. Only a single RBUF frame can be set in a tag.
if (oRBUFID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null RBUF frame in tag.");
}
RBUFID3V2Frame oRBUF = (RBUFID3V2Frame)m_oFrameIdToFrameMap.put("RBUF", oRBUFID3V2Frame);
// set this tag object up as a listener for changes to this frame
oRBUFID3V2Frame.addID3Observer(this);
try
{
oRBUFID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oRBUF != null)
{
oRBUF.removeID3Observer(this);
}
return oRBUF;
|
public RVADID3V2Frame | setRVADFrame(RVADID3V2Frame oRVADID3V2Frame)Set a relative volume adjustment frame in this tag. Only a single RVAD frame can be set in a tag.
if (oRVADID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null RVAD frame in tag.");
}
RVADID3V2Frame oRVAD = (RVADID3V2Frame)m_oFrameIdToFrameMap.put("RVAD", oRVADID3V2Frame);
// set this tag object up as a listener for changes to this frame
oRVADID3V2Frame.addID3Observer(this);
try
{
oRVADID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oRVAD != null)
{
oRVAD.removeID3Observer(this);
}
return oRVAD;
|
public RVRBID3V2Frame | setRVRBFrame(RVRBID3V2Frame oRVRBID3V2Frame)Set a reverb frame in this tag. Only a single RVRB frame can be set in a tag.
if (oRVRBID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null RVRB frame in tag.");
}
RVRBID3V2Frame oRVRB = (RVRBID3V2Frame)m_oFrameIdToFrameMap.put("RVRB", oRVRBID3V2Frame);
// set this tag object up as a listener for changes to this frame
oRVRBID3V2Frame.addID3Observer(this);
try
{
oRVRBID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oRVRB != null)
{
oRVRB.removeID3Observer(this);
}
return oRVRB;
|
public SYTCID3V2Frame | setSYTCFrame(SYTCID3V2Frame oSYTCID3V2Frame)Set a synchronized tempo codes frame in this tag. Only a single SYTC frame can be set in a tag.
if (oSYTCID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null SYTC frame in tag.");
}
SYTCID3V2Frame oSYTC = (SYTCID3V2Frame)m_oFrameIdToFrameMap.put("SYTC", oSYTCID3V2Frame);
// set this tag object up as a listener for changes to this frame
oSYTCID3V2Frame.addID3Observer(this);
try
{
oSYTCID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oSYTC != null)
{
oSYTC.removeID3Observer(this);
}
return oSYTC;
|
public TALBTextInformationID3V2Frame | setTALBTextInformationFrame(TALBTextInformationID3V2Frame oTALBTextInformationID3V2Frame)Set an album/movie/show title frame in this tag. Only a single TALB frame can be set in a tag.
if (oTALBTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TALB text information frame in tag.");
}
TALBTextInformationID3V2Frame oTALB = (TALBTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TALB", oTALBTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTALBTextInformationID3V2Frame.addID3Observer(this);
try
{
oTALBTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTALB != null)
{
oTALB.removeID3Observer(this);
}
return oTALB;
|
public TBPMTextInformationID3V2Frame | setTBPMTextInformationFrame(TBPMTextInformationID3V2Frame oTBPMTextInformationID3V2Frame)Set a BPM (beats per minute) frame in this tag. Only a single TBPM frame can be set in a tag.
if (oTBPMTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TBPM text information frame in tag.");
}
TBPMTextInformationID3V2Frame oTBPM = (TBPMTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TBPM", oTBPMTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTBPMTextInformationID3V2Frame.addID3Observer(this);
try
{
oTBPMTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTBPM != null)
{
oTBPM.removeID3Observer(this);
}
return oTBPM;
|
public TCOMTextInformationID3V2Frame | setTCOMTextInformationFrame(TCOMTextInformationID3V2Frame oTCOMTextInformationID3V2Frame)Set a composer frame in this tag. Only a single TCOM frame can be set in a tag.
if (oTCOMTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TCOM text information frame in tag.");
}
TCOMTextInformationID3V2Frame oTCOM = (TCOMTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TCOM", oTCOMTextInformationID3V2Frame);
if (oTCOM != null)
{
oTCOM.removeID3Observer(this);
}
return oTCOM;
|
public TCONTextInformationID3V2Frame | setTCONTextInformationFrame(TCONTextInformationID3V2Frame oTCONTextInformationID3V2Frame)Set a content type frame in this tag. Only a single TCON frame can be set in a tag.
if (oTCONTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TCON text information frame in tag.");
}
TCONTextInformationID3V2Frame oTCON = (TCONTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TCON", oTCONTextInformationID3V2Frame);
if (oTCON != null)
{
oTCON.removeID3Observer(this);
}
return oTCON;
|
public TCOPTextInformationID3V2Frame | setTCOPTextInformationFrame(TCOPTextInformationID3V2Frame oTCOPTextInformationID3V2Frame)Set a copyright message frame in this tag. Only a single TCOP frame can be set in a tag.
if (oTCOPTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TCOP text information frame in tag.");
}
TCOPTextInformationID3V2Frame oTCOP = (TCOPTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TCOP", oTCOPTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTCOPTextInformationID3V2Frame.addID3Observer(this);
try
{
oTCOPTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTCOP != null)
{
oTCOP.removeID3Observer(this);
}
return oTCOP;
|
public TDATTextInformationID3V2Frame | setTDATTextInformationFrame(TDATTextInformationID3V2Frame oTDATTextInformationID3V2Frame)Set a date frame in this tag. Only a single TDAT frame can be set in a tag.
if (oTDATTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TDAT text information frame in tag.");
}
TDATTextInformationID3V2Frame oTDAT = (TDATTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TDAT", oTDATTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTDATTextInformationID3V2Frame.addID3Observer(this);
try
{
oTDATTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTDAT != null)
{
oTDAT.removeID3Observer(this);
}
return oTDAT;
|
public TDLYTextInformationID3V2Frame | setTDLYTextInformationFrame(TDLYTextInformationID3V2Frame oTDLYTextInformationID3V2Frame)Set a playlist delay frame in this tag. Only a single TDLY frame can be set in a tag.
if (oTDLYTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TDLY text information frame in tag.");
}
TDLYTextInformationID3V2Frame oTDLY = (TDLYTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TDLY", oTDLYTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTDLYTextInformationID3V2Frame.addID3Observer(this);
try
{
oTDLYTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTDLY != null)
{
oTDLY.removeID3Observer(this);
}
return oTDLY;
|
public TENCTextInformationID3V2Frame | setTENCTextInformationFrame(TENCTextInformationID3V2Frame oTENCTextInformationID3V2Frame)Set an encoded by frame in this tag. Only a single TENC frame can be set in a tag.
if (oTENCTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TENC text information frame in tag.");
}
TENCTextInformationID3V2Frame oTENC = (TENCTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TENC", oTENCTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTENCTextInformationID3V2Frame.addID3Observer(this);
try
{
oTENCTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTENC != null)
{
oTENC.removeID3Observer(this);
}
return oTENC;
|
public TEXTTextInformationID3V2Frame | setTEXTTextInformationFrame(TEXTTextInformationID3V2Frame oTEXTTextInformationID3V2Frame)Set a lyricist/text writer frame in this tag. Only a single TEXT frame can be set in a tag.
if (oTEXTTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TEXT text information frame in tag.");
}
TEXTTextInformationID3V2Frame oTEXT = (TEXTTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TEXT", oTEXTTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTEXTTextInformationID3V2Frame.addID3Observer(this);
try
{
oTEXTTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTEXT != null)
{
oTEXT.removeID3Observer(this);
}
return oTEXT;
|
public TFLTTextInformationID3V2Frame | setTFLTTextInformationFrame(TFLTTextInformationID3V2Frame oTFLTTextInformationID3V2Frame)Set a file type frame in this tag. Only a single TFLT frame can be set in a tag.
if (oTFLTTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TFLT text information frame in tag.");
}
TFLTTextInformationID3V2Frame oTFLT = (TFLTTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TFLT", oTFLTTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTFLTTextInformationID3V2Frame.addID3Observer(this);
try
{
oTFLTTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTFLT != null)
{
oTFLT.removeID3Observer(this);
}
return oTFLT;
|
public TIMETextInformationID3V2Frame | setTIMETextInformationFrame(TIMETextInformationID3V2Frame oTIMETextInformationID3V2Frame)Set a time frame in this tag. Only a single TIME frame can be set in a tag.
if (oTIMETextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TIME text information frame in tag.");
}
TIMETextInformationID3V2Frame oTIME = (TIMETextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TIME", oTIMETextInformationID3V2Frame);
if (oTIME != null)
{
oTIME.removeID3Observer(this);
}
return oTIME;
|
public TIT1TextInformationID3V2Frame | setTIT1TextInformationFrame(TIT1TextInformationID3V2Frame oTIT1TextInformationID3V2Frame)Set a content group description frame in this tag. Only a single TIT1 frame can be set in a tag.
if (oTIT1TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TIT1 text information frame in tag.");
}
TIT1TextInformationID3V2Frame oTIT1 = (TIT1TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TIT1", oTIT1TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTIT1TextInformationID3V2Frame.addID3Observer(this);
try
{
oTIT1TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTIT1 != null)
{
oTIT1.removeID3Observer(this);
}
return oTIT1;
|
public TIT2TextInformationID3V2Frame | setTIT2TextInformationFrame(TIT2TextInformationID3V2Frame oTIT2TextInformationID3V2Frame)Set a title/songname/content description frame in this tag. Only a single TIT2 frame can be set in a tag.
if (oTIT2TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TIT2 text information frame in tag.");
}
TIT2TextInformationID3V2Frame oTIT2 = (TIT2TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TIT2", oTIT2TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTIT2TextInformationID3V2Frame.addID3Observer(this);
try
{
oTIT2TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTIT2 != null)
{
oTIT2.removeID3Observer(this);
}
return oTIT2;
|
public TIT3TextInformationID3V2Frame | setTIT3TextInformationFrame(TIT3TextInformationID3V2Frame oTIT3TextInformationID3V2Frame)Set a subtitle/description refinement frame in this tag. Only a single TIT3 frame can be set in a tag.
if (oTIT3TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TIT3 text information frame in tag.");
}
TIT3TextInformationID3V2Frame oTIT3 = (TIT3TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TIT3", oTIT3TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTIT3TextInformationID3V2Frame.addID3Observer(this);
try
{
oTIT3TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTIT3 != null)
{
oTIT3.removeID3Observer(this);
}
return oTIT3;
|
public TKEYTextInformationID3V2Frame | setTKEYTextInformationFrame(TKEYTextInformationID3V2Frame oTKEYTextInformationID3V2Frame)Set an initial key frame in this tag. Only a single TKEY frame can be set in a tag.
if (oTKEYTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TKEY text information frame in tag.");
}
TKEYTextInformationID3V2Frame oTKEY = (TKEYTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TKEY", oTKEYTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTKEYTextInformationID3V2Frame.addID3Observer(this);
try
{
oTKEYTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTKEY != null)
{
oTKEY.removeID3Observer(this);
}
return oTKEY;
|
public TLANTextInformationID3V2Frame | setTLANTextInformationFrame(TLANTextInformationID3V2Frame oTLANTextInformationID3V2Frame)Set a language(s) frame in this tag. Only a single TLAN frame can be set in a tag.
if (oTLANTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TLAN text information frame in tag.");
}
TLANTextInformationID3V2Frame oTLAN = (TLANTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TLAN", oTLANTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTLANTextInformationID3V2Frame.addID3Observer(this);
try
{
oTLANTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTLAN != null)
{
oTLAN.removeID3Observer(this);
}
return oTLAN;
|
public TLENTextInformationID3V2Frame | setTLENTextInformationFrame(TLENTextInformationID3V2Frame oTLENTextInformationID3V2Frame)Set a length frame in this tag. Only a single TLEN frame can be set in a tag.
if (oTLENTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TLEN text information frame in tag.");
}
TLENTextInformationID3V2Frame oTLEN = (TLENTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TLEN", oTLENTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTLENTextInformationID3V2Frame.addID3Observer(this);
try
{
oTLENTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTLEN != null)
{
oTLEN.removeID3Observer(this);
}
return oTLEN;
|
public TMEDTextInformationID3V2Frame | setTMEDTextInformationFrame(TMEDTextInformationID3V2Frame oTMEDTextInformationID3V2Frame)Set a media type frame in this tag. Only a single TMED frame can be set in a tag.
if (oTMEDTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TMED text information frame in tag.");
}
TMEDTextInformationID3V2Frame oTMED = (TMEDTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TMED", oTMEDTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTMEDTextInformationID3V2Frame.addID3Observer(this);
try
{
oTMEDTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTMED != null)
{
oTMED.removeID3Observer(this);
}
return oTMED;
|
public TOALTextInformationID3V2Frame | setTOALTextInformationFrame(TOALTextInformationID3V2Frame oTOALTextInformationID3V2Frame)Set a original album/movie/show title frame in this tag. Only a single TOAL frame can be set in a tag.
if (oTOALTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TOAL text information frame in tag.");
}
TOALTextInformationID3V2Frame oTOAL = (TOALTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TOAL", oTOALTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTOALTextInformationID3V2Frame.addID3Observer(this);
try
{
oTOALTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTOAL != null)
{
oTOAL.removeID3Observer(this);
}
return oTOAL;
|
public TOFNTextInformationID3V2Frame | setTOFNTextInformationFrame(TOFNTextInformationID3V2Frame oTOFNTextInformationID3V2Frame)Set an original filename frame in this tag. Only a single TOFN frame can be set in a tag.
if (oTOFNTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TOFN text information frame in tag.");
}
TOFNTextInformationID3V2Frame oTOFN = (TOFNTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TOFN", oTOFNTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTOFNTextInformationID3V2Frame.addID3Observer(this);
try
{
oTOFNTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTOFN != null)
{
oTOFN.removeID3Observer(this);
}
return oTOFN;
|
public TOLYTextInformationID3V2Frame | setTOLYTextInformationFrame(TOLYTextInformationID3V2Frame oTOLYTextInformationID3V2Frame)Set an original lyricist(s)/text writer(s) frame in this tag. Only a single TOLY frame can be set in a tag.
if (oTOLYTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TOLY text information frame in tag.");
}
TOLYTextInformationID3V2Frame oTOLY = (TOLYTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TOLY", oTOLYTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTOLYTextInformationID3V2Frame.addID3Observer(this);
try
{
oTOLYTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTOLY != null)
{
oTOLY.removeID3Observer(this);
}
return oTOLY;
|
public TOPETextInformationID3V2Frame | setTOPETextInformationFrame(TOPETextInformationID3V2Frame oTOPETextInformationID3V2Frame)Set a original artist(s)/performer(s) frame in this tag. Only a single TOPE frame can be set in a tag.
if (oTOPETextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TOPE text information frame in tag.");
}
TOPETextInformationID3V2Frame oTOPE = (TOPETextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TOPE", oTOPETextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTOPETextInformationID3V2Frame.addID3Observer(this);
try
{
oTOPETextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTOPE != null)
{
oTOPE.removeID3Observer(this);
}
return oTOPE;
|
public TORYTextInformationID3V2Frame | setTORYTextInformationFrame(TORYTextInformationID3V2Frame oTORYTextInformationID3V2Frame)Set a original release year frame in this tag. Only a single TORY frame can be set in a tag.
if (oTORYTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TORY text information frame in tag.");
}
TORYTextInformationID3V2Frame oTORY = (TORYTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TORY", oTORYTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTORYTextInformationID3V2Frame.addID3Observer(this);
try
{
oTORYTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTORY != null)
{
oTORY.removeID3Observer(this);
}
return oTORY;
|
public TOWNTextInformationID3V2Frame | setTOWNTextInformationFrame(TOWNTextInformationID3V2Frame oTOWNTextInformationID3V2Frame)Set a file owner/licensee frame in this tag. Only a single TOWN frame can be set in a tag.
if (oTOWNTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TOWN text information frame in tag.");
}
TOWNTextInformationID3V2Frame oTOWN = (TOWNTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TOWN", oTOWNTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTOWNTextInformationID3V2Frame.addID3Observer(this);
try
{
oTOWNTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTOWN != null)
{
oTOWN.removeID3Observer(this);
}
return oTOWN;
|
public TPE1TextInformationID3V2Frame | setTPE1TextInformationFrame(TPE1TextInformationID3V2Frame oTPE1TextInformationID3V2Frame)Set a lead performer(s)/soloist(s) frame in this tag. Only a single TPE1 frame can be set in a tag.
if (oTPE1TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TPE1 text information frame in tag.");
}
TPE1TextInformationID3V2Frame oTPE1 = (TPE1TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TPE1", oTPE1TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTPE1TextInformationID3V2Frame.addID3Observer(this);
try
{
oTPE1TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTPE1 != null)
{
oTPE1.removeID3Observer(this);
}
return oTPE1;
|
public TPE2TextInformationID3V2Frame | setTPE2TextInformationFrame(TPE2TextInformationID3V2Frame oTPE2TextInformationID3V2Frame)Set a band/orchestra/accompaniment frame in this tag. Only a single TPE2 frame can be set in a tag.
if (oTPE2TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TPE2 text information frame in tag.");
}
TPE2TextInformationID3V2Frame oTPE2 = (TPE2TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TPE2", oTPE2TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTPE2TextInformationID3V2Frame.addID3Observer(this);
try
{
oTPE2TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTPE2 != null)
{
oTPE2.removeID3Observer(this);
}
return oTPE2;
|
public TPE3TextInformationID3V2Frame | setTPE3TextInformationFrame(TPE3TextInformationID3V2Frame oTPE3TextInformationID3V2Frame)Set a conductor/performer refinement frame in this tag. Only a single TPE3 frame can be set in a tag.
if (oTPE3TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TPE3 text information frame in tag.");
}
TPE3TextInformationID3V2Frame oTPE3 = (TPE3TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TPE3", oTPE3TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTPE3TextInformationID3V2Frame.addID3Observer(this);
try
{
oTPE3TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTPE3 != null)
{
oTPE3.removeID3Observer(this);
}
return oTPE3;
|
public TPE4TextInformationID3V2Frame | setTPE4TextInformationFrame(TPE4TextInformationID3V2Frame oTPE4TextInformationID3V2Frame)Set an interpreted, remixed or otherwise modified by frame in this tag. Only a single TPE4 frame can be set in a tag.
if (oTPE4TextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TPE4 text information frame in tag.");
}
TPE4TextInformationID3V2Frame oTPE4 = (TPE4TextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TPE4", oTPE4TextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTPE4TextInformationID3V2Frame.addID3Observer(this);
try
{
oTPE4TextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTPE4 != null)
{
oTPE4.removeID3Observer(this);
}
return oTPE4;
|
public TPOSTextInformationID3V2Frame | setTPOSTextInformationFrame(TPOSTextInformationID3V2Frame oTPOSTextInformationID3V2Frame)Set a part of a set frame in this tag. Only a single TPOS frame can be set in a tag.
if (oTPOSTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TPOS text information frame in tag.");
}
TPOSTextInformationID3V2Frame oTPOS = (TPOSTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TPOS", oTPOSTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTPOSTextInformationID3V2Frame.addID3Observer(this);
try
{
oTPOSTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTPOS != null)
{
oTPOS.removeID3Observer(this);
}
return oTPOS;
|
public TPUBTextInformationID3V2Frame | setTPUBTextInformationFrame(TPUBTextInformationID3V2Frame oTPUBTextInformationID3V2Frame)Set a publisher frame in this tag. Only a single TPUB frame can be set in a tag.
if (oTPUBTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TPUB text information frame in tag.");
}
TPUBTextInformationID3V2Frame oTPUB = (TPUBTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TPUB", oTPUBTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTPUBTextInformationID3V2Frame.addID3Observer(this);
try
{
oTPUBTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTPUB != null)
{
oTPUB.removeID3Observer(this);
}
return oTPUB;
|
public TRCKTextInformationID3V2Frame | setTRCKTextInformationFrame(TRCKTextInformationID3V2Frame oTRCKTextInformationID3V2Frame)Set a track number/position in set frame in this tag. Only a single TRCK frame can be set in a tag.
if (oTRCKTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TRCK text information frame in tag.");
}
TRCKTextInformationID3V2Frame oTRCK = (TRCKTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TRCK", oTRCKTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTRCKTextInformationID3V2Frame.addID3Observer(this);
try
{
oTRCKTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTRCK != null)
{
oTRCK.removeID3Observer(this);
}
return oTRCK;
|
public TRDATextInformationID3V2Frame | setTRDATextInformationFrame(TRDATextInformationID3V2Frame oTRDATextInformationID3V2Frame)Set a recording dates frame in this tag. Only a single TRDA frame can be set in a tag.
if (oTRDATextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TRDA text information frame in tag.");
}
TRDATextInformationID3V2Frame oTRDA = (TRDATextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TRDA", oTRDATextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTRDATextInformationID3V2Frame.addID3Observer(this);
try
{
oTRDATextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTRDA != null)
{
oTRDA.removeID3Observer(this);
}
return oTRDA;
|
public TRSNTextInformationID3V2Frame | setTRSNTextInformationFrame(TRSNTextInformationID3V2Frame oTRSNTextInformationID3V2Frame)Set an internet radio station name frame in this tag. Only a single TRSN frame can be set in a tag.
if (oTRSNTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TRSN text information frame in tag.");
}
TRSNTextInformationID3V2Frame oTRSN = (TRSNTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TRSN", oTRSNTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTRSNTextInformationID3V2Frame.addID3Observer(this);
try
{
oTRSNTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTRSN != null)
{
oTRSN.removeID3Observer(this);
}
return oTRSN;
|
public TRSOTextInformationID3V2Frame | setTRSOTextInformationFrame(TRSOTextInformationID3V2Frame oTRSOTextInformationID3V2Frame)Set an internet radio station owner frame in this tag. Only a single TRSO frame can be set in a tag.
if (oTRSOTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TRSO text information frame in tag.");
}
TRSOTextInformationID3V2Frame oTRSO = (TRSOTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TRSO", oTRSOTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTRSOTextInformationID3V2Frame.addID3Observer(this);
try
{
oTRSOTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTRSO != null)
{
oTRSO.removeID3Observer(this);
}
return oTRSO;
|
public TSIZTextInformationID3V2Frame | setTSIZTextInformationFrame(TSIZTextInformationID3V2Frame oTSIZTextInformationID3V2Frame)Set a size frame in this tag. Only a single TSIZ frame can be set in a tag.
if (oTSIZTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TSIZ text information frame in tag.");
}
TSIZTextInformationID3V2Frame oTSIZ = (TSIZTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TSIZ", oTSIZTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTSIZTextInformationID3V2Frame.addID3Observer(this);
try
{
oTSIZTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTSIZ != null)
{
oTSIZ.removeID3Observer(this);
}
return oTSIZ;
|
public TSRCTextInformationID3V2Frame | setTSRCTextInformationFrame(TSRCTextInformationID3V2Frame oTSRCTextInformationID3V2Frame)Set an ISRC (international standard recording code) frame in this tag. Only a single TSRC frame can be set in a tag.
if (oTSRCTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TSRC text information frame in tag.");
}
TSRCTextInformationID3V2Frame oTSRC = (TSRCTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TSRC", oTSRCTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTSRCTextInformationID3V2Frame.addID3Observer(this);
try
{
oTSRCTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTSRC != null)
{
oTSRC.removeID3Observer(this);
}
return oTSRC;
|
public TSSETextInformationID3V2Frame | setTSSETextInformationFrame(TSSETextInformationID3V2Frame oTSSETextInformationID3V2Frame)Set a software/hardware and settings used for recording frame in this tag. Only a single TSSE frame can be set in a tag.
if (oTSSETextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TSSE text information frame in tag.");
}
TSSETextInformationID3V2Frame oTSSE = (TSSETextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TSSE", oTSSETextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTSSETextInformationID3V2Frame.addID3Observer(this);
try
{
oTSSETextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTSSE != null)
{
oTSSE.removeID3Observer(this);
}
return oTSSE;
|
public TYERTextInformationID3V2Frame | setTYERTextInformationFrame(TYERTextInformationID3V2Frame oTYERTextInformationID3V2Frame)Set a year frame in this tag. Only a single TYER frame can be set in a tag.
if (oTYERTextInformationID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null TYER text information frame in tag.");
}
TYERTextInformationID3V2Frame oTYER = (TYERTextInformationID3V2Frame)m_oFrameIdToFrameMap.put("TYER", oTYERTextInformationID3V2Frame);
// set this tag object up as a listener for changes to this frame
oTYERTextInformationID3V2Frame.addID3Observer(this);
try
{
oTYERTextInformationID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oTYER != null)
{
oTYER.removeID3Observer(this);
}
return oTYER;
|
public void | setTitle(java.lang.String sTitle)
// remove any current frame
this.removeTIT2TextInformationFrame();
// set new frame
this.setTIT2TextInformationFrame(new TIT2TextInformationID3V2Frame(sTitle));
|
public void | setTrackNumber(int iTrackNumber)
// remove any current frame
this.removeTRCKTextInformationFrame();
// set new frame
this.setTRCKTextInformationFrame(new TRCKTextInformationID3V2Frame(iTrackNumber));
|
public void | setTrackNumber(int iTrackNumber, int iTotalTracks)
// remove any current frame
this.removeTRCKTextInformationFrame();
// set new frame
this.setTRCKTextInformationFrame(new TRCKTextInformationID3V2Frame(iTrackNumber, iTotalTracks));
|
public USERID3V2Frame | setUSERFrame(USERID3V2Frame oUSERID3V2Frame)Set a terms of use frame in this tag. Only a single USER frame can be set in a tag.
if (oUSERID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null USER frame in tag.");
}
USERID3V2Frame oUSER = (USERID3V2Frame)m_oFrameIdToFrameMap.put("USER", oUSERID3V2Frame);
// set this tag object up as a listener for changes to this frame
oUSERID3V2Frame.addID3Observer(this);
try
{
oUSERID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oUSER != null)
{
oUSER.removeID3Observer(this);
}
return oUSER;
|
public WCOPUrlLinkID3V2Frame | setWCOPUrlLinkFrame(WCOPUrlLinkID3V2Frame oWCOPUrlLinkID3V2Frame)Set a copyright/legal information frame in this tag. Only a single WCOP frame can be set in a tag.
if (oWCOPUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null WCOPUrlLink frame in tag.");
}
WCOPUrlLinkID3V2Frame oWCOP = (WCOPUrlLinkID3V2Frame)m_oFrameIdToFrameMap.put("WCOP", oWCOPUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWCOPUrlLinkID3V2Frame.addID3Observer(this);
try
{
oWCOPUrlLinkID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oWCOP != null)
{
oWCOP.removeID3Observer(this);
}
return oWCOP;
|
public WOAFUrlLinkID3V2Frame | setWOAFUrlLinkFrame(WOAFUrlLinkID3V2Frame oWOAFUrlLinkID3V2Frame)Set an official audio file webpage frame in this tag. Only a single WOAF frame can be set in a tag.
if (oWOAFUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null WOAFUrlLink frame in tag.");
}
WOAFUrlLinkID3V2Frame oWOAF = (WOAFUrlLinkID3V2Frame)m_oFrameIdToFrameMap.put("WOAF", oWOAFUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWOAFUrlLinkID3V2Frame.addID3Observer(this);
try
{
oWOAFUrlLinkID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oWOAF != null)
{
oWOAF.removeID3Observer(this);
}
return oWOAF;
|
public WOASUrlLinkID3V2Frame | setWOASUrlLinkFrame(WOASUrlLinkID3V2Frame oWOASUrlLinkID3V2Frame)Set an official audio source webpage frame in this tag. Only a single WOAS frame can be set in a tag.
if (oWOASUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null WOASUrlLink frame in tag.");
}
WOASUrlLinkID3V2Frame oWOAS = (WOASUrlLinkID3V2Frame)m_oFrameIdToFrameMap.put("WOAS", oWOASUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWOASUrlLinkID3V2Frame.addID3Observer(this);
try
{
oWOASUrlLinkID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oWOAS != null)
{
oWOAS.removeID3Observer(this);
}
return oWOAS;
|
public WORSUrlLinkID3V2Frame | setWORSUrlLinkFrame(WORSUrlLinkID3V2Frame oWORSUrlLinkID3V2Frame)Set an official internet radio station homepage frame in this tag. Only a single WORS frame can be set in a tag.
if (oWORSUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null WORSUrlLink frame in tag.");
}
WORSUrlLinkID3V2Frame oWORS = (WORSUrlLinkID3V2Frame)m_oFrameIdToFrameMap.put("WORS", oWORSUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWORSUrlLinkID3V2Frame.addID3Observer(this);
try
{
oWORSUrlLinkID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oWORS != null)
{
oWORS.removeID3Observer(this);
}
return oWORS;
|
public WPAYUrlLinkID3V2Frame | setWPAYUrlLinkFrame(WPAYUrlLinkID3V2Frame oWPAYUrlLinkID3V2Frame)Set a payment frame in this tag. Only a single WPAY frame can be set in a tag.
if (oWPAYUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null WPAYUrlLink frame in tag.");
}
WPAYUrlLinkID3V2Frame oWPAY = (WPAYUrlLinkID3V2Frame)m_oFrameIdToFrameMap.put("WPAY", oWPAYUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWPAYUrlLinkID3V2Frame.addID3Observer(this);
try
{
oWPAYUrlLinkID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oWPAY != null)
{
oWPAY.removeID3Observer(this);
}
return oWPAY;
|
public WPUBUrlLinkID3V2Frame | setWPUBUrlLinkFrame(WPUBUrlLinkID3V2Frame oWPUBUrlLinkID3V2Frame)Set a publisher's official webpage frame in this tag. Only a single WPUB frame can be set in a tag.
if (oWPUBUrlLinkID3V2Frame == null)
{
throw new NullPointerException("Attempt to set null WPUBUrlLink frame in tag.");
}
WPUBUrlLinkID3V2Frame oWPUB = (WPUBUrlLinkID3V2Frame)m_oFrameIdToFrameMap.put("WPUB", oWPUBUrlLinkID3V2Frame);
// set this tag object up as a listener for changes to this frame
oWPUBUrlLinkID3V2Frame.addID3Observer(this);
try
{
oWPUBUrlLinkID3V2Frame.notifyID3Observers();
}
catch (Exception e) {}
// this tag will no longer listen for changes to the removed frame
if (oWPUB != null)
{
oWPUB.removeID3Observer(this);
}
return oWPUB;
|
public void | setYear(int iYear)
// remove any current frame
this.removeTYERTextInformationFrame();
// set new frame
this.setTYERTextInformationFrame(new TYERTextInformationID3V2Frame(iYear));
|
private static void | storeID3V2Frame(ID3V2Frame oID3V2Frame, org.blinkenlights.jid3.v2.ID3V2_3_0Tag oID3V2_3_0Tag)Store a frame in this tag, using reflection to search for an appropriate mathod.
// search for the available method which can add this frame to the tag
String sMethodName = null;
Method oMethod = null;
String[] asMethodSuffix = { "Frame", "TextInformationFrame", "UrlLinkFrame" };
for (int i=0; i < asMethodSuffix.length; i++)
{
try
{
sMethodName = "add" + new String(oID3V2Frame.getFrameId()) + asMethodSuffix[i];
oMethod = oID3V2_3_0Tag.getClass().getMethod(sMethodName, new Class[] { oID3V2Frame.getClass() });
oMethod.invoke(oID3V2_3_0Tag, new Object[] { oID3V2Frame });
return;
}
catch (NoSuchMethodException e) {}
catch (IllegalAccessException e) {}
catch (InvocationTargetException e) { throw (Exception)e.getCause(); }
try
{
sMethodName = "set" + new String(oID3V2Frame.getFrameId()) + asMethodSuffix[i];
oMethod = oID3V2_3_0Tag.getClass().getMethod(sMethodName, new Class[] { oID3V2Frame.getClass() });
oMethod.invoke(oID3V2_3_0Tag, new Object[] { oID3V2Frame });
return;
}
catch (NoSuchMethodException e) {}
catch (IllegalAccessException e) {}
catch (InvocationTargetException e) { throw (Exception)e.getCause(); }
}
// if we're here, this frame is unknown
oID3V2_3_0Tag.m_oUnknownFrameList.add(oID3V2Frame);
|
private void | synchronizeEncryption()Go through all frame stored in this tag, ensuring that their encryption details are up-to-date. This is
required whenever frames are marked encrypted or not, or when ENCR frames are changed, etc.
ID3V2Frame[] aoID3V2Frame = getAllFrames();
for (int i=0; i < aoID3V2Frame.length; i++)
{
ID3V2Frame oID3V2Frame = aoID3V2Frame[i];
if (oID3V2Frame.isEncrypted())
{
try
{
ICryptoAgent oCryptoAgent = findCryptoAgent(oID3V2Frame.getEncryptionMethod());
byte[] abyEncryptionData = findEncryptionData(oID3V2Frame.getEncryptionMethod());
oID3V2Frame.setCryptoAgent(oCryptoAgent, abyEncryptionData);
}
catch (ID3Exception e) {}
}
}
|
public void | update(ID3Subject oID3Subject)
if (oID3Subject instanceof ID3V2Frame)
{
ID3V2Frame oID3V2Frame = (ID3V2Frame)oID3Subject;
validateFrameMapping(oID3V2Frame);
}
synchronizeEncryption();
|
private void | validateFrameMapping(ID3V2Frame oID3V2Frame)
if (oID3V2Frame instanceof AENCID3V2Frame)
{
AENCID3V2Frame oAENC = (AENCID3V2Frame)oID3V2Frame;
String sOwnerIdentifier = oAENC.getOwnerIdentifier();
// check if there is a conflict
AENCID3V2Frame oOtherAENC = (AENCID3V2Frame)m_oAENCOwnerIdentifierToFrameMap.get(sOwnerIdentifier);
if ((oAENC != oOtherAENC) && (oOtherAENC != null))
{
throw new ID3Exception("Conflict between AENC frames with owner identifier [" + sOwnerIdentifier + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oAENCOwnerIdentifierToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oAENC == m_oAENCOwnerIdentifierToFrameMap.get(oKey))
{
m_oAENCOwnerIdentifierToFrameMap.remove(oKey);
m_oAENCOwnerIdentifierToFrameMap.put(sOwnerIdentifier, oAENC);
break;
}
}
}
else if (oID3V2Frame instanceof APICID3V2Frame)
{
APICID3V2Frame oAPIC = (APICID3V2Frame)oID3V2Frame;
String sDescription = oAPIC.getDescription();
// check if there is a conflict
APICID3V2Frame oOtherAPIC = (APICID3V2Frame)m_oAPICDescriptionToFrameMap.get(sDescription);
if ((oAPIC != oOtherAPIC) && (oOtherAPIC != null))
{
throw new ID3Exception("Conflict between APIC frames with description [" + sDescription + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oAPICDescriptionToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oAPIC == m_oAPICDescriptionToFrameMap.get(oKey))
{
m_oAPICDescriptionToFrameMap.remove(oKey);
m_oAPICDescriptionToFrameMap.put(sDescription, oAPIC);
break;
}
}
}
else if (oID3V2Frame instanceof COMMID3V2Frame)
{
COMMID3V2Frame oCOMM = (COMMID3V2Frame)oID3V2Frame;
String sLanguage = oCOMM.getLanguage();
String sShortDescription = oCOMM.getShortDescription();
String sLanguageAndContentDescriptor = sLanguage + sShortDescription;
// check if there is a conflict
COMMID3V2Frame oOtherCOMM = (COMMID3V2Frame)m_oCOMMLanguageAndContentDescriptorToFrameMap.get(sLanguageAndContentDescriptor);
if ((oCOMM != oOtherCOMM) && (oOtherCOMM != null))
{
throw new ID3Exception("Conflict between COMM frames with language [" + sLanguage + "] and short description [" + sShortDescription + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oCOMMLanguageAndContentDescriptorToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oCOMM == m_oCOMMLanguageAndContentDescriptorToFrameMap.get(oKey))
{
m_oCOMMLanguageAndContentDescriptorToFrameMap.remove(oKey);
m_oCOMMLanguageAndContentDescriptorToFrameMap.put(sLanguageAndContentDescriptor, oCOMM);
break;
}
}
}
else if (oID3V2Frame instanceof ENCRID3V2Frame)
{
ENCRID3V2Frame oENCR = (ENCRID3V2Frame)oID3V2Frame;
byte byEncryptionMethodSymbol = oENCR.getEncryptionMethodSymbol();
// check if there is a conflict
ENCRID3V2Frame oOtherENCR = (ENCRID3V2Frame)m_oENCRMethodToFrameMap.get(new Byte(byEncryptionMethodSymbol));
if ((oENCR != oOtherENCR) && (oOtherENCR != null))
{
throw new ID3Exception("Conflict between ENCR frames with the same method symbol [" + byEncryptionMethodSymbol + "].");
}
// check to see if there exists an ENCR frame with the same owner identifier
Iterator oCheckIter = m_oENCRMethodToFrameMap.values().iterator();
while (oCheckIter.hasNext())
{
ENCRID3V2Frame oCheckENCR = (ENCRID3V2Frame)oCheckIter.next();
if ((oENCR != oCheckENCR) && (oENCR.getOwnerIdentifier().equals(oCheckENCR.getOwnerIdentifier())))
{
throw new ID3Exception("Conflict between ENCR frames with the same method symbol [" + oCheckENCR.getOwnerIdentifier() + "].");
}
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oENCRMethodToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oENCR == m_oENCRMethodToFrameMap.get(oKey))
{
m_oENCRMethodToFrameMap.remove(oKey);
m_oENCRMethodToFrameMap.put(new Byte(byEncryptionMethodSymbol), oENCR);
break;
}
}
}
else if (oID3V2Frame instanceof GEOBID3V2Frame)
{
GEOBID3V2Frame oGEOB = (GEOBID3V2Frame)oID3V2Frame;
String sContentDescription = oGEOB.getContentDescription();
// check if there is a conflict
GEOBID3V2Frame oOtherGEOB = (GEOBID3V2Frame)m_oGEOBContentDescriptorToFrameMap.get(sContentDescription);
if ((oGEOB != oOtherGEOB) && (oOtherGEOB != null))
{
throw new ID3Exception("Conflict between GEOB frames with content description [" + sContentDescription + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oGEOBContentDescriptorToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oGEOB == m_oGEOBContentDescriptorToFrameMap.get(oKey))
{
m_oGEOBContentDescriptorToFrameMap.remove(oKey);
m_oGEOBContentDescriptorToFrameMap.put(sContentDescription, oGEOB);
break;
}
}
}
else if (oID3V2Frame instanceof GRIDID3V2Frame)
{
GRIDID3V2Frame oGRID = (GRIDID3V2Frame)oID3V2Frame;
byte byGroupSymbol = oGRID.getGroupSymbol();
// check if there is a conflict
GRIDID3V2Frame oOtherGRID = (GRIDID3V2Frame)m_oGRIDGroupSymbolToFrameMap.get(new Byte(byGroupSymbol));
if ((oGRID != oOtherGRID) && (oOtherGRID != null))
{
throw new ID3Exception("Conflict between GRID frames with the same group symbol [" + byGroupSymbol + "].");
}
// check to see if there exists an GRID frame with the same owner identifier
Iterator oCheckIter = m_oGRIDGroupSymbolToFrameMap.values().iterator();
while (oCheckIter.hasNext())
{
GRIDID3V2Frame oCheckGRID = (GRIDID3V2Frame)oCheckIter.next();
if ((oGRID != oCheckGRID) && (oGRID.getOwnerIdentifier().equals(oCheckGRID.getOwnerIdentifier())))
{
throw new ID3Exception("Conflict between GRID frames with the same group symbol [" + oCheckGRID.getOwnerIdentifier() + "].");
}
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oGRIDGroupSymbolToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oGRID == m_oGRIDGroupSymbolToFrameMap.get(oKey))
{
m_oGRIDGroupSymbolToFrameMap.remove(oKey);
m_oGRIDGroupSymbolToFrameMap.put(new Byte(byGroupSymbol), oGRID);
break;
}
}
}
else if (oID3V2Frame instanceof LINKID3V2Frame)
{
LINKID3V2Frame oLINK = (LINKID3V2Frame)oID3V2Frame;
String sContents = new String(oLINK.getFrameId()) + oLINK.getLinkUrl() + oLINK.getAdditionalData();
// check if there is a conflict
LINKID3V2Frame oOtherLINK = (LINKID3V2Frame)m_oLINKContentsToFrameMap.get(sContents);
if ((oLINK != oOtherLINK) && (oOtherLINK != null))
{
throw new ID3Exception("Conflict between LINK frames with frame ID [" + new String(oLINK.getFrameId()) +
"], URL [" + oLINK.getLinkUrl() + "] and additional data [" + oLINK.getAdditionalData() + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oLINKContentsToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oLINK == m_oLINKContentsToFrameMap.get(oKey))
{
m_oLINKContentsToFrameMap.remove(oKey);
m_oLINKContentsToFrameMap.put(sContents, oLINK);
break;
}
}
}
else if (oID3V2Frame instanceof POPMID3V2Frame)
{
POPMID3V2Frame oPOPM = (POPMID3V2Frame)oID3V2Frame;
String sEmailToUser = oPOPM.getEmailToUser();
// check if there is a conflict
POPMID3V2Frame oOtherPOPM = (POPMID3V2Frame)m_oPOPMEmailToFrameMap.get(sEmailToUser);
if ((oPOPM != oOtherPOPM) && (oOtherPOPM != null))
{
throw new ID3Exception("Conflict between POPM frames with email address [" + sEmailToUser + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oPOPMEmailToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oPOPM == m_oPOPMEmailToFrameMap.get(oKey))
{
m_oPOPMEmailToFrameMap.remove(oKey);
m_oPOPMEmailToFrameMap.put(sEmailToUser, oPOPM);
break;
}
}
}
else if (oID3V2Frame instanceof PRIVID3V2Frame)
{
PRIVID3V2Frame oPRIV = (PRIVID3V2Frame)oID3V2Frame;
String sHash = null;
try
{
MessageDigest oMD = MessageDigest.getInstance("MD5");
oMD.update(oPRIV.getPrivateData());
byte[] abyDigest = oMD.digest();
sHash = ID3Util.convertBytesToHexString(abyDigest, false);
}
catch (Exception e)
{
throw new ID3Exception("Error hashing private data in PRIV frame.", e);
}
String sContents = oPRIV.getOwnerIdentifier() + sHash;
// check if there is a conflict
PRIVID3V2Frame oOtherPRIV = (PRIVID3V2Frame)m_oPRIVContentsToFrameMap.get(sContents);
if ((oPRIV != oOtherPRIV) && (oOtherPRIV != null))
{
throw new ID3Exception("Conflict between PRIV frames with owner identifier [" + oPRIV.getOwnerIdentifier() +
"] and matching private data.");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oPRIVContentsToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oPRIV == m_oPRIVContentsToFrameMap.get(oKey))
{
m_oPRIVContentsToFrameMap.remove(oKey);
m_oPRIVContentsToFrameMap.put(sContents, oPRIV);
break;
}
}
}
else if (oID3V2Frame instanceof SYLTID3V2Frame)
{
SYLTID3V2Frame oSYLT = (SYLTID3V2Frame)oID3V2Frame;
String sLanguageAndContentDescriptor = oSYLT.getLanguage() + oSYLT.getContentDescriptor();
// check if there is a conflict
SYLTID3V2Frame oOtherSYLT = (SYLTID3V2Frame)m_oSYLTLanguageAndContentDescriptorToFrameMap.get(sLanguageAndContentDescriptor);
if ((oSYLT != oOtherSYLT) && (oOtherSYLT != null))
{
throw new ID3Exception("Conflict between SYLT frames with language [" + oSYLT.getLanguage() +
"] and content descriptor [" + oSYLT.getContentDescriptor() + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oSYLTLanguageAndContentDescriptorToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oSYLT == m_oSYLTLanguageAndContentDescriptorToFrameMap.get(oKey))
{
m_oSYLTLanguageAndContentDescriptorToFrameMap.remove(oKey);
m_oSYLTLanguageAndContentDescriptorToFrameMap.put(sLanguageAndContentDescriptor, oSYLT);
break;
}
}
}
else if (oID3V2Frame instanceof TXXXTextInformationID3V2Frame)
{
TXXXTextInformationID3V2Frame oTXXX = (TXXXTextInformationID3V2Frame)oID3V2Frame;
String sDescription = oTXXX.getDescription();
// check if there is a conflict
TXXXTextInformationID3V2Frame oOtherTXXX = (TXXXTextInformationID3V2Frame)m_oTXXXDescriptionToFrameMap.get(sDescription);
if ((oTXXX != oOtherTXXX) && (oOtherTXXX != null))
{
throw new ID3Exception("Conflict between TXXX frames with description [" + sDescription + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oTXXXDescriptionToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oTXXX == m_oTXXXDescriptionToFrameMap.get(oKey))
{
m_oTXXXDescriptionToFrameMap.remove(oKey);
m_oTXXXDescriptionToFrameMap.put(sDescription, oTXXX);
break;
}
}
}
else if (oID3V2Frame instanceof UFIDID3V2Frame)
{
UFIDID3V2Frame oUFID = (UFIDID3V2Frame)oID3V2Frame;
String sOwnerIdentifier = oUFID.getOwnerIdentifier();
// check if there is a conflict
UFIDID3V2Frame oOtherUFID = (UFIDID3V2Frame)m_oUFIDOwnerIdentifierToFrameMap.get(sOwnerIdentifier);
if ((oUFID != oOtherUFID) && (oOtherUFID != null))
{
throw new ID3Exception("Conflict between UFID frames with owner identifier [" + sOwnerIdentifier + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oUFIDOwnerIdentifierToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oUFID == m_oUFIDOwnerIdentifierToFrameMap.get(oKey))
{
m_oUFIDOwnerIdentifierToFrameMap.remove(oKey);
m_oUFIDOwnerIdentifierToFrameMap.put(sOwnerIdentifier, oUFID);
break;
}
}
}
else if (oID3V2Frame instanceof USLTID3V2Frame)
{
USLTID3V2Frame oUSLT = (USLTID3V2Frame)oID3V2Frame;
String sLanguageAndContentDescriptor = oUSLT.getLanguage() + oUSLT.getContentDescriptor();
// check if there is a conflict
USLTID3V2Frame oOtherUSLT = (USLTID3V2Frame)m_oUSLTLanguageAndContentDescriptorToFrameMap.get(sLanguageAndContentDescriptor);
if ((oUSLT != oOtherUSLT) && (oOtherUSLT != null))
{
throw new ID3Exception("Conflict between USLT frames with language [" + oUSLT.getLanguage() +
"] and content descriptor [" + oUSLT.getContentDescriptor() + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oUSLTLanguageAndContentDescriptorToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oUSLT == m_oUSLTLanguageAndContentDescriptorToFrameMap.get(oKey))
{
m_oUSLTLanguageAndContentDescriptorToFrameMap.remove(oKey);
m_oUSLTLanguageAndContentDescriptorToFrameMap.put(sLanguageAndContentDescriptor, oUSLT);
break;
}
}
}
else if (oID3V2Frame instanceof WCOMUrlLinkID3V2Frame)
{
WCOMUrlLinkID3V2Frame oWCOM = (WCOMUrlLinkID3V2Frame)oID3V2Frame;
String sURL = oWCOM.getCommercialInformationUrl();
// check if there is a conflict
WCOMUrlLinkID3V2Frame oOtherWCOM = (WCOMUrlLinkID3V2Frame)m_oWCOMUrlToFrameMap.get(sURL);
if ((oWCOM != oOtherWCOM) && (oOtherWCOM != null))
{
throw new ID3Exception("Conflict between WCOM frames with URL [" + sURL + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oWCOMUrlToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oWCOM == m_oWCOMUrlToFrameMap.get(oKey))
{
m_oWCOMUrlToFrameMap.remove(oKey);
m_oWCOMUrlToFrameMap.put(sURL, oWCOM);
break;
}
}
}
else if (oID3V2Frame instanceof WOARUrlLinkID3V2Frame)
{
WOARUrlLinkID3V2Frame oWOAR = (WOARUrlLinkID3V2Frame)oID3V2Frame;
String sURL = oWOAR.getOfficialArtistWebPage();
// check if there is a conflict
WOARUrlLinkID3V2Frame oOtherWOAR = (WOARUrlLinkID3V2Frame)m_oWOARUrlToFrameMap.get(sURL);
if ((oWOAR != oOtherWOAR) && (oOtherWOAR != null))
{
throw new ID3Exception("Conflict between WOAR frames with URL [" + sURL + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oWOARUrlToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oWOAR == m_oWOARUrlToFrameMap.get(oKey))
{
m_oWOARUrlToFrameMap.remove(oKey);
m_oWOARUrlToFrameMap.put(sURL, oWOAR);
break;
}
}
}
else if (oID3V2Frame instanceof WXXXUrlLinkID3V2Frame)
{
WXXXUrlLinkID3V2Frame oWXXX = (WXXXUrlLinkID3V2Frame)oID3V2Frame;
String sDescription = oWXXX.getDescription();
// check if there is a conflict
WXXXUrlLinkID3V2Frame oOtherWXXX = (WXXXUrlLinkID3V2Frame)m_oWXXXDescriptionToFrameMap.get(sDescription);
if ((oWXXX != oOtherWXXX) && (oOtherWXXX != null))
{
throw new ID3Exception("Conflict between WXXX frames with description [" + sDescription + "].");
}
// if we are here, there is no conflict, so update mapping
Iterator oIter = m_oWXXXDescriptionToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
Object oKey = oIter.next();
if (oWXXX == m_oWXXXDescriptionToFrameMap.get(oKey))
{
m_oWXXXDescriptionToFrameMap.remove(oKey);
m_oWXXXDescriptionToFrameMap.put(sDescription, oWXXX);
break;
}
}
}
|
public void | write(java.io.OutputStream oOS)
try
{
ID3DataOutputStream oIDOS = new ID3DataOutputStream(oOS);
// write ID3 header
oIDOS.write("ID3".getBytes());
// version and patch number
oIDOS.write(3);
oIDOS.write(0);
// write all frames to a tag buffer
ByteArrayOutputStream oTagBAOS = new ByteArrayOutputStream();
Iterator oIter;
// AENC
oIter = m_oAENCOwnerIdentifierToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// APIC
oIter = m_oAPICDescriptionToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// COMM
oIter = m_oCOMMLanguageAndContentDescriptorToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// ENCR
oIter = m_oENCRMethodToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// GEOB
oIter = m_oGEOBContentDescriptorToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// GRID
oIter = m_oGRIDGroupSymbolToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// LINK
oIter = m_oLINKContentsToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// PRIV
oIter = m_oPRIVContentsToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// POPM
oIter = m_oPOPMEmailToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// SYLT
oIter = m_oSYLTLanguageAndContentDescriptorToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// TXXX
oIter = m_oTXXXDescriptionToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// UFID
oIter = m_oUFIDOwnerIdentifierToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// USLT
oIter = m_oUSLTLanguageAndContentDescriptorToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// WCOM
oIter = m_oWCOMUrlToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// WOAR
oIter = m_oWOARUrlToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// WXXX
oIter = m_oWXXXDescriptionToFrameMap.values().iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
// write all single frames mapped from frame id to frame
// (COMR,EQUA,ETCO,IPLS,MCDI,MLLT,OWNE,PCNT,POSS,RBUF,RVAD,RVRB,SYTC,TALB,TBPM,TCOM,TCON,TCOP,TDAT,TDLY,
// TENC,TEXT,TFLT,TIME,TIT1,TIT2,TIT3,TKEY,TLAN,TLEN,TMED,TOAL,TOFN,TOLY,TOPE,TORY,TOWN,TPE1,TPE2,TPE3,
// TPE4,TPOS,TPUB,TRCK,TRDA,TRSN,TRSO,TSIZ,TSRC,TSSE,TYER,USER,WCOP,WOAF,WOAS,WORS,WPAY,PUB)
oIter = m_oFrameIdToFrameMap.keySet().iterator();
while (oIter.hasNext())
{
String sFrameId = (String)oIter.next();
ID3V2Frame oID3V2Frame = (ID3V2Frame)m_oFrameIdToFrameMap.get(sFrameId);
oID3V2Frame.write(oTagBAOS);
}
// Unknown frames
oIter = m_oUnknownFrameList.iterator();
while (oIter.hasNext())
{
((ID3V2Frame)oIter.next()).write(oTagBAOS);
}
byte[] abyTag = oTagBAOS.toByteArray();
// unsynchronize the tag if option set and unsynchronizing is required
boolean bUnsynchronized = false;
if ((m_bUnsynchronizationUsedFlag) && (ID3Util.requiresUnsynchronization(abyTag)))
{
abyTag = ID3Util.unsynchronize(abyTag);
bUnsynchronized = true;
}
// write flags
int iFlags = 0;
if (bUnsynchronized) // specify if we _used_ the method, not if we were prepared to use it
{
iFlags |= 0x80;
}
if (m_bExtendedHeaderFlag)
{
iFlags |= 0x40;
}
if (m_bExperimentalFlag)
{
iFlags |= 0x20;
}
oIDOS.write(iFlags);
// create the extended header if enabled
byte[] abyExtendedHeader = null;
if (m_bExtendedHeaderFlag)
{
ByteArrayOutputStream oExtendedHeaderBAOS = new ByteArrayOutputStream();
ID3DataOutputStream oEHIDOS = new ID3DataOutputStream(oExtendedHeaderBAOS);
// header size
int iHeaderSize = m_bCRCDataFlag ? 10 : 6; // size based on whether CRC present or not
oEHIDOS.writeBE32(iHeaderSize);
// flags
int iFirstFlagByte = 0;
if (m_bCRCDataFlag)
{
iFirstFlagByte |= 0x80;
}
oEHIDOS.writeUnsignedByte(iFirstFlagByte);
oEHIDOS.writeUnsignedByte(0); // second flag byte always zero
// size of padding
oEHIDOS.writeBE32(m_iPaddingLength);
// CRC if enabled
if (m_bCRCDataFlag)
{
CRC32 oCRC32 = new CRC32();
oCRC32.update(abyTag);
//System.out.println("Writing CRC value " + oCRC32.getValue() + " for " + ID3Util.convertBytesToHexString(abyTag, true));
oEHIDOS.writeUnsignedBE32(oCRC32.getValue());
}
oEHIDOS.flush();
abyExtendedHeader = oExtendedHeaderBAOS.toByteArray();
}
// write tag size (length of all frames), preceded possibly by extended header and including its length,
// and also any padding length after the frames
int iTagSize = abyTag.length;
if (m_bExtendedHeaderFlag)
{
oIDOS.writeID3Four(iTagSize + abyExtendedHeader.length + m_iPaddingLength);
oIDOS.write(abyExtendedHeader);
}
else
{
oIDOS.writeID3Four(iTagSize + m_iPaddingLength);
}
// write tag (frames)
oIDOS.write(abyTag);
// write padding.
oIDOS.write(new byte[m_iPaddingLength]);
oIDOS.flush();
}
catch (ID3Exception e)
{
throw e;
}
catch (Exception e)
{
throw new ID3Exception("Error writing tag.", e);
}
|