entagged.audioformats.mp3.util.id3frames
Class GenericId3Frame

java.lang.Object
  extended by entagged.audioformats.mp3.util.id3frames.Id3Frame
      extended by entagged.audioformats.mp3.util.id3frames.GenericId3Frame
All Implemented Interfaces:
TagField

public class GenericId3Frame
extends Id3Frame


Field Summary
 
Fields inherited from class entagged.audioformats.mp3.util.id3frames.Id3Frame
flags, version
 
Constructor Summary
GenericId3Frame(String id, byte[] raw, byte version)
           
 
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.
 byte[] getData()
           
 String getId()
          (overridden)
For Id3-Frames its something like "TCOM","TENC","TALB" and so on.
 boolean isBinary()
          (overridden)
 boolean isCommon()
          (overridden)
 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.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
 

Constructor Detail

GenericId3Frame

public GenericId3Frame(String id,
                       byte[] raw,
                       byte version)
                throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

getId

public String getId()
Description copied from class: Id3Frame
(overridden)
For Id3-Frames its something like "TCOM","TENC","TALB" and so on.

Specified by:
getId in interface TagField
Specified by:
getId in class Id3Frame
Returns:
Unique identifier for the fields type. (title, artist...)
See Also:
TagField.getId()

isBinary

public boolean isBinary()
Description copied from class: Id3Frame
(overridden)

Specified by:
isBinary in interface TagField
Specified by:
isBinary in class Id3Frame
Returns:
true if field represents binary data (not human readable).
See Also:
TagField.isBinary()

getData

public byte[] getData()

isCommon

public boolean isCommon()
Description copied from class: Id3Frame
(overridden)

Specified by:
isCommon in interface TagField
Specified by:
isCommon in class Id3Frame
Returns:
true if the field is of common use.
See Also:
TagField.isCommon()

copyContent

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

Parameters:
field - The field containing the data to be taken.

isEmpty

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

Returns:
true if no data is stored (or empty String).

populate

protected void populate(byte[] raw)
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.

Specified by:
populate in class Id3Frame
Parameters:
raw - The frame data.

build

protected byte[] build()
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

Specified by:
build in class Id3Frame
Returns:
Binary representation of current frame based on the implementation (what does it stand for) and data (its contents).

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 Object
Returns:
Description of the fields content.


Copyright © 2007-2008. All Rights Reserved.