entagged.audioformats.mp3.util.id3frames
Class CommId3Frame

java.lang.Object
  extended by entagged.audioformats.mp3.util.id3frames.Id3Frame
      extended by entagged.audioformats.mp3.util.id3frames.TextId3Frame
          extended by entagged.audioformats.mp3.util.id3frames.CommId3Frame
All Implemented Interfaces:
TagField, TagTextField

public class CommId3Frame
extends TextId3Frame
implements TagTextField


Field Summary
 
Fields inherited from class entagged.audioformats.mp3.util.id3frames.TextId3Frame
common, content, encoding, id
 
Fields inherited from class entagged.audioformats.mp3.util.id3frames.Id3Frame
flags, version
 
Constructor Summary
CommId3Frame(byte[] rawContent, byte version)
           
CommId3Frame(String content)
           
 
Method Summary
protected  byte[] build()
          This method creates a binary representation of the current Id3Frame data.
This data can directly be written to a file or stream.
s
 void copyContent(TagField field)
          This method copies the data of the given filed to the current data.
 int getCommentStart(byte[] content, int offset, String encoding)
          This methods interprets content to be a valid comment section.
 String getLangage()
           
 String getShortDescription()
           
 boolean isEmpty()
          Determines whether the content of the field is empty.
protected  void populate(byte[] raw)
          This method reads the given data of an ID3-Frame and interprets it implementation specific.
The values of the Id3Frame instance are adjusted.
 String toString()
          This method returns a human readable description of the fields contents.
For text fields it should be the text itself.
 
Methods inherited from class entagged.audioformats.mp3.util.id3frames.TextId3Frame
getContent, getEncoding, getId, isBinary, isCommon, setContent, setEncoding
 
Methods inherited from class entagged.audioformats.mp3.util.id3frames.Id3Frame
clone, copy, equals, getBytes, getFlags, getIdBytes, getRawContent, getSize, getString, indexOfFirstNull, isBinary
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface entagged.audioformats.generic.TagTextField
getContent, getEncoding, setContent, setEncoding
 
Methods inherited from interface entagged.audioformats.generic.TagField
getId, getRawContent, isBinary, isBinary, isCommon
 

Constructor Detail

CommId3Frame

public CommId3Frame(String content)

CommId3Frame

public CommId3Frame(byte[] rawContent,
                    byte version)
             throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

getLangage

public String getLangage()

populate

protected void populate(byte[] raw)
                 throws UnsupportedEncodingException
Description copied from class: Id3Frame
This method reads the given data of an ID3-Frame and interprets it implementation specific.
The values of the Id3Frame instance are adjusted.

Overrides:
populate in class TextId3Frame
Parameters:
raw - The frame data.
Throws:
UnsupportedEncodingException - On text frames there can be such errors.

getCommentStart

public int getCommentStart(byte[] content,
                           int offset,
                           String encoding)
This methods interprets content to be a valid comment section. where first comes a short comment directly after that the comment section. This method searches for the terminal character of the short description, and return the index of the first byte of the fulltext comment.

Parameters:
content - The comment data.
offset - The offset where the short descriptions is about to start.
encoding - the encoding of the field.
Returns:
the index (including given offset) for the first byte of the fulltext commen.

build

protected byte[] build()
                throws UnsupportedEncodingException
Description copied from class: Id3Frame
This method creates a binary representation of the current Id3Frame data.
This data can directly be written to a file or stream.
s

Overrides:
build in class TextId3Frame
Returns:
Binary representation of current frame based on the implementation (what does it stand for) and data (its contents).
Throws:
UnsupportedEncodingException - If a text-Frame is constructed there can occur an error during text conversions.

getShortDescription

public String getShortDescription()

isEmpty

public boolean isEmpty()
Description copied from interface: TagField
Determines whether the content of the field is empty.

Specified by:
isEmpty in interface TagField
Overrides:
isEmpty in class TextId3Frame
Returns:
true if no data is stored (or empty String).

copyContent

public void copyContent(TagField field)
Description copied from interface: TagField
This method copies the data of the given filed to the current data.

Specified by:
copyContent in interface TagField
Overrides:
copyContent in class TextId3Frame
Parameters:
field - The field containing the data to be taken.

toString

public String toString()
Description copied from interface: TagField
This method returns a human readable description of the fields contents.
For text fields it should be the text itself. Other fields containing images may return a formatted string with image properties like width, height and so on.

Specified by:
toString in interface TagField
Overrides:
toString in class TextId3Frame
Returns:
Description of the fields content.


Copyright © 2007-2008. All Rights Reserved.