org.metasyntactic.id3.v2.frame
Class COMM

java.lang.Object
  |
  +--org.metasyntactic.id3.v2.frame.Frame
        |
        +--org.metasyntactic.id3.v2.frame.COMM
All Implemented Interfaces:
Id3v2Constants

public class COMM
extends Frame
implements Id3v2Constants

This frame is intended for any kind of full text information that does not fit in any other frame. It consists of a frame header followed by encoding, language and content descriptors and is ended with the actual comment as a text string. Newline characters are allowed in the comment text string. There may be more than one comment frame in each tag, but only one with the same language and content descriptor.

 
Text encoding $xx Language $xx xx xx Short content descrip. $00 (00) The actual text


Field Summary
 
Fields inherited from class org.metasyntactic.id3.v2.frame.Frame
compressed, dataLengthIndicator, discardOnFileAlteration, discardOnTagAlteration, encrypted, frameID, groupInformation, readOnly, unsynchronised
 
Fields inherited from interface org.metasyntactic.id3.v2.Id3v2Constants
ISO_8859_1, JAVA_ISO_8859_1, JAVA_US_ASCII, JAVA_UTF_16, JAVA_UTF_16_BIG_ENDIAN, JAVA_UTF_8, MAJOR_VERSION, MAX_ENCODING, MIN_ENCODING, REVISION_NUMBER, UTF_16, UTF_16_BIG_ENDIAN, UTF_8
 
Constructor Summary
protected COMM()
           
  COMM(java.lang.String language, java.lang.String shortContentDescription, java.lang.String comment)
          Language must be a 3 character string from org.metasyntactic.language.codes.ISO_639_B
 
Method Summary
 int getSize()
          A COMM frame uses 1 byte for the encoding, 3 bytes for the language, and then the length of the comment in encoded bytes
 void readContent(java.io.PushbackInputStream in, int length)
          Subclasses must implement this method so that they can restore the contents of their fields from the stream
 java.lang.String toString()
           
 void writeContent(java.io.OutputStream out)
          This is called as the last step of write(OutputStream).
 
Methods inherited from class org.metasyntactic.id3.v2.frame.Frame
getTotalSize, hasDataLengthIndicator, isCompressed, isDiscardedOnFileAlteration, isDiscardedOnTagAlteration, isEncrypted, isPartOfGroup, isReadOnly, isUnsynchronized, read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

COMM

protected COMM()

COMM

public COMM(java.lang.String language,
            java.lang.String shortContentDescription,
            java.lang.String comment)
Language must be a 3 character string from org.metasyntactic.language.codes.ISO_639_B

Method Detail

getSize

public int getSize()
A COMM frame uses 1 byte for the encoding, 3 bytes for the language, and then the length of the comment in encoded bytes

Overrides:
getSize in class Frame

readContent

public void readContent(java.io.PushbackInputStream in,
                        int length)
                 throws java.io.IOException,
                        Id3v2Exception
Description copied from class: Frame
Subclasses must implement this method so that they can restore the contents of their fields from the stream

Specified by:
readContent in class Frame
java.io.IOException
Id3v2Exception

writeContent

public void writeContent(java.io.OutputStream out)
                  throws java.io.IOException
Description copied from class: Frame
This is called as the last step of write(OutputStream). Subclasses must implement in order to properly write out their data to the stream

Specified by:
writeContent in class Frame
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class Frame