entagged.audioformats.mp3.util.id3frames
Class ApicId3Frame

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.ApicId3Frame
All Implemented Interfaces:
TagField, TagTextField

public class ApicId3Frame
extends TextId3Frame


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
ApicId3Frame(byte[] rawContent, byte version)
           
ApicId3Frame(String description, String mime, byte pictureType, byte[] data)
           
 
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 getMimeType()
           
 byte getPictureType()
           
 String getPictureTypeAsString()
           
 boolean isBinary()
          (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.TextId3Frame
getContent, getEncoding, getId, 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.TagField
getRawContent, isBinary
 

Constructor Detail

ApicId3Frame

public ApicId3Frame(byte[] rawContent,
                    byte version)
             throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

ApicId3Frame

public ApicId3Frame(String description,
                    String mime,
                    byte pictureType,
                    byte[] data)
Method Detail

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.

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.

getData

public byte[] getData()

getMimeType

public String getMimeType()

getPictureType

public byte getPictureType()

getPictureTypeAsString

public String getPictureTypeAsString()

isBinary

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

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

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).

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.

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.