org.jaudiotagger.tag.id3
Class ID3v23Frame

java.lang.Object
  extended by org.jaudiotagger.tag.id3.AbstractTagItem
      extended by org.jaudiotagger.tag.id3.AbstractTagFrame
          extended by org.jaudiotagger.tag.id3.AbstractID3v2Frame
              extended by org.jaudiotagger.tag.id3.ID3v23Frame
All Implemented Interfaces:
TagField

public class ID3v23Frame
extends AbstractID3v2Frame

Represents an ID3v2.3 frame.

Version:
$Id: ID3v23Frame.java,v 1.34 2007/11/29 12:05:26 paultaylor Exp $
Author:
: Paul Taylor, : Eric Farng

Field Summary
 
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagItem
logger
 
Constructor Summary
ID3v23Frame()
          Creates a new ID3v23 Frame
ID3v23Frame(AbstractID3v2Frame frame)
          Creates a new ID3v23Frame based on another frame.
ID3v23Frame(java.nio.ByteBuffer byteBuffer)
          Deprecated. use ID3v23Frame(ByteBuffer,String) instead
ID3v23Frame(java.nio.ByteBuffer byteBuffer, java.lang.String loggingFilename)
          Creates a new ID3v23Frame datatype by reading from byteBuffer.
ID3v23Frame(ID3v23Frame frame)
          Copy Constructor Creates a new v23 frame based on another v23 frame
ID3v23Frame(java.lang.String identifier)
          Creates a new ID3v23 Frame of type identifier.
 
Method Summary
 void createStructure()
          Return String Representation of body
 boolean equals(java.lang.Object obj)
          Compare for equality To be deemed equal obj must be a IDv23Frame with the same identifier and the same flags.
 int getSize()
          Return size of frame
 boolean isBinary()
          Determines whether the represented field contains (is made up of) binary data, instead of text data.
Software can identify fields to be displayed because they are human readable if this method returns false.
 boolean isCommon()
          Identifies a field to be of common use.
Some software may differ between common and not common fields.
 boolean isValidID3v2FrameIdentifier(java.lang.String identifier)
          Does the frame identifier meet the syntax for a idv3v2 frame identifier.
 void read(java.nio.ByteBuffer byteBuffer)
          Read the frame from a bytebuffer
 void write(java.io.ByteArrayOutputStream tagBuffer)
          Write the frame to bufferOutputStream
 
Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3v2Frame
copyContent, getId, getIdentifier, getRawContent, isBinary, isEmpty
 
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagFrame
getBody, isSubsetOf, setBody
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jaudiotagger.tag.TagField
toString
 

Constructor Detail

ID3v23Frame

public ID3v23Frame()
Creates a new ID3v23 Frame


ID3v23Frame

public ID3v23Frame(java.lang.String identifier)
Creates a new ID3v23 Frame of type identifier.

An empty body of the correct type will be automatically created. This constructor should be used when wish to create a new frame from scratch using user data.


ID3v23Frame

public ID3v23Frame(ID3v23Frame frame)
Copy Constructor Creates a new v23 frame based on another v23 frame


ID3v23Frame

public ID3v23Frame(AbstractID3v2Frame frame)
            throws InvalidFrameException
Creates a new ID3v23Frame based on another frame.

Parameters:
frame -
Throws:
InvalidFrameException

ID3v23Frame

public ID3v23Frame(java.nio.ByteBuffer byteBuffer,
                   java.lang.String loggingFilename)
            throws InvalidFrameException
Creates a new ID3v23Frame datatype by reading from byteBuffer.

Parameters:
byteBuffer - to read from
Throws:
InvalidFrameException

ID3v23Frame

public ID3v23Frame(java.nio.ByteBuffer byteBuffer)
            throws InvalidFrameException
Deprecated. use ID3v23Frame(ByteBuffer,String) instead

Creates a new ID3v23Frame datatype by reading from byteBuffer.

Parameters:
byteBuffer - to read from
Throws:
InvalidFrameException
Method Detail

getSize

public int getSize()
Return size of frame

Specified by:
getSize in class AbstractTagItem
Returns:
int frame size

equals

public boolean equals(java.lang.Object obj)
Compare for equality To be deemed equal obj must be a IDv23Frame with the same identifier and the same flags. containing the same body,datatype list ectera. equals() method is made up from all the various components

Overrides:
equals in class AbstractTagFrame
Parameters:
obj -
Returns:
if true if this object is equivalent to obj

read

public void read(java.nio.ByteBuffer byteBuffer)
          throws InvalidFrameException
Read the frame from a bytebuffer

Specified by:
read in class AbstractTagItem
Parameters:
byteBuffer - buffer to read from
Throws:
InvalidFrameException

write

public void write(java.io.ByteArrayOutputStream tagBuffer)
Write the frame to bufferOutputStream

Specified by:
write in class AbstractID3v2Frame
Throws:
java.io.IOException

isValidID3v2FrameIdentifier

public boolean isValidID3v2FrameIdentifier(java.lang.String identifier)
Does the frame identifier meet the syntax for a idv3v2 frame identifier. must start with a capital letter and only contain capital letters and numbers

Parameters:
identifier - to be checked
Returns:
whether the identifier is valid

createStructure

public void createStructure()
Return String Representation of body

Overrides:
createStructure in class AbstractID3v2Frame

isCommon

public boolean isCommon()
Description copied from interface: TagField
Identifies a field to be of common use.
Some software may differ between common and not common fields. A common one is for sure the title field. A web link may not be of common use for tagging. However some file formats, or future development of users expectations will make more fields common than now can be known.

Returns:
true if considered a common frame

isBinary

public boolean isBinary()
Description copied from interface: TagField
Determines whether the represented field contains (is made up of) binary data, instead of text data.
Software can identify fields to be displayed because they are human readable if this method returns false.

Returns:
true if considered a common frame