entagged.audioformats.ape.util
Class ApeTagBinaryField

java.lang.Object
  extended by entagged.audioformats.ape.util.ApeTagField
      extended by entagged.audioformats.ape.util.ApeTagBinaryField
All Implemented Interfaces:
TagField

public class ApeTagBinaryField
extends ApeTagField


Constructor Summary
ApeTagBinaryField(String id, byte[] content)
           
 
Method Summary
 void copyContent(TagField field)
          This method copies the data of the given filed to the current data.
 byte[] getContent()
           
 byte[] getRawContent()
          This method delivers the binary representation of the fields data in order to be directly written to the file.
 boolean isEmpty()
          Determines whether the content of the field is empty.
 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.ape.util.ApeTagField
copy, getBytes, getId, getSize, isBinary, isBinary, isCommon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApeTagBinaryField

public ApeTagBinaryField(String id,
                         byte[] content)
Method Detail

isEmpty

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

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

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
Specified by:
toString in class ApeTagField
Returns:
Description of the fields content.

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
Specified by:
copyContent in class ApeTagField
Parameters:
field - The field containing the data to be taken.

getContent

public byte[] getContent()

getRawContent

public byte[] getRawContent()
                     throws UnsupportedEncodingException
Description copied from interface: TagField
This method delivers the binary representation of the fields data in order to be directly written to the file.

Specified by:
getRawContent in interface TagField
Specified by:
getRawContent in class ApeTagField
Returns:
Binary data representing the current tag field.
Throws:
UnsupportedEncodingException - Most tag data represents text. In some cases the underlying implementation will need to convert the text data in java to a specific charset encoding. In these cases an UnsupportedEncodingException may occur.


Copyright © 2007-2008. All Rights Reserved.