org.jaudiotagger.tag.datatype
Class AbstractString

java.lang.Object
  extended by org.jaudiotagger.tag.datatype.AbstractDataType
      extended by org.jaudiotagger.tag.datatype.AbstractString
Direct Known Subclasses:
PartOfSet, StringFixedLength, TextEncodedStringNullTerminated, TextEncodedStringSizeTerminated

public abstract class AbstractString
extends AbstractDataType

A partial implementation for String based ID3 fields


Field Summary
 
Fields inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
frameBody, identifier, logger, size, TYPE_ELEMENT, value
 
Constructor Summary
protected AbstractString(AbstractString object)
          Copy constructor
protected AbstractString(java.lang.String identifier, AbstractTagFrameBody frameBody)
          Creates a new datatype
  AbstractString(java.lang.String identifier, AbstractTagFrameBody frameBody, java.lang.String value)
          Creates a new datatype, with value
 
Method Summary
 boolean canBeEncoded()
          Check the value can be encoded with the specified encoding
 int getSize()
          Return the size in bytes of this datatype as it was/is held in file this will be effected by the encoding type.
protected  void setSize(int size)
          Sets the size in bytes of this datatype.
 java.lang.String toString()
          Return String representation of datatype
 
Methods inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
createStructure, equals, getBody, getIdentifier, getValue, readByteArray, readByteArray, setBody, setValue, writeByteArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractString

protected AbstractString(java.lang.String identifier,
                         AbstractTagFrameBody frameBody)
Creates a new datatype

Parameters:
identifier -
frameBody -

AbstractString

public AbstractString(java.lang.String identifier,
                      AbstractTagFrameBody frameBody,
                      java.lang.String value)
Creates a new datatype, with value

Parameters:
identifier -
frameBody -
value -

AbstractString

protected AbstractString(AbstractString object)
Copy constructor

Parameters:
object -
Method Detail

getSize

public int getSize()
Return the size in bytes of this datatype as it was/is held in file this will be effected by the encoding type.

Specified by:
getSize in class AbstractDataType
Returns:
the size

setSize

protected void setSize(int size)
Sets the size in bytes of this datatype. This is set after writing the data to allow us to recalculate the size for frame header.

Parameters:
size -

toString

public java.lang.String toString()
Return String representation of datatype

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the value

canBeEncoded

public boolean canBeEncoded()
Check the value can be encoded with the specified encoding

Returns: