FileDocCategorySizeDatePackage
FrameBodyDeprecated.javaAPI DocJaudiotagger 2.0.42996Wed Mar 30 16:12:02 BST 2011org.jaudiotagger.tag.id3.framebody

FrameBodyDeprecated

public class FrameBodyDeprecated extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
Represents a frameBody for a frame identifier that is not defined for the tag version but was valid for a for an earlier tag version. The body consists of an array of bytes representing all the bytes in the body.

Fields Summary
private AbstractID3v2FrameBody
originalFrameBody
The original frameBody is held so can be retrieved when converting a DeprecatedFrameBody back to a normal framebody
Constructors Summary
public FrameBodyDeprecated(AbstractID3v2FrameBody frameBody)
Creates a new FrameBodyDeprecated wrapper around the frameBody

param
frameBody

        this.originalFrameBody = frameBody;
    
public FrameBodyDeprecated(FrameBodyDeprecated copyObject)
Copy constructor

param
copyObject a copy is made of this

        super(copyObject);
    
Methods Summary
public booleanequals(java.lang.Object obj)

param
obj
return
whether obj is equivalent to this object

        if (!(obj instanceof FrameBodyDeprecated))
        {
            return false;
        }

        FrameBodyDeprecated object = (FrameBodyDeprecated) obj;
        return this.getIdentifier().equals(object.getIdentifier()) && super.equals(obj);
    
public java.lang.StringgetBriefDescription()

        //TODO When is this null, it seems it can be but Im not sure why
        if (originalFrameBody != null)
        {
            return originalFrameBody.getBriefDescription();
        }
        return "";
    
public java.lang.StringgetIdentifier()
Return the frame identifier

return
the identifier

        return originalFrameBody.getIdentifier();
    
public AbstractID3v2FrameBodygetOriginalFrameBody()
Return the original frameBody that was used to construct the DeprecatedFrameBody

return
the original frameBody

        return originalFrameBody;
    
public intgetSize()
Delgate size to size of original frameBody, if frameBody already exist will take this value from the frame header but it is always recalculated before writing any changes back to disk.

return
size in bytes of this frame body

        return originalFrameBody.getSize();
    
protected voidsetupObjectList()
Setup the Object List.

This is handled by the wrapped class


    
public java.lang.StringtoString()
Because the contents of this frame are an array of bytes and could be large we just return the identifier.

return
a string representation of this frame

        return getIdentifier();