org.jaudiotagger.tag.datatype
Class PairedTextEncodedStringNullTerminated

java.lang.Object
  extended by org.jaudiotagger.tag.datatype.AbstractDataType
      extended by org.jaudiotagger.tag.datatype.MultipleTextEncodedStringNullTerminated
          extended by org.jaudiotagger.tag.datatype.PairedTextEncodedStringNullTerminated

public class PairedTextEncodedStringNullTerminated
extends MultipleTextEncodedStringNullTerminated

Represents a datatype that allow multiple Strings but they should be paired, i.e should be 2,4,6.. Strings

TODO Pair restriction not currently implemented


Nested Class Summary
static class PairedTextEncodedStringNullTerminated.ValuePairs
          This holds the values held by this PairedTextEncodedDatatype, always held as pairs of values
 
Nested classes/interfaces inherited from class org.jaudiotagger.tag.datatype.MultipleTextEncodedStringNullTerminated
MultipleTextEncodedStringNullTerminated.Values
 
Field Summary
 
Fields inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
frameBody, identifier, logger, size, TYPE_ELEMENT, value
 
Constructor Summary
PairedTextEncodedStringNullTerminated(PairedTextEncodedStringNullTerminated object)
           
PairedTextEncodedStringNullTerminated(java.lang.String identifier, AbstractTagFrameBody frameBody)
           
PairedTextEncodedStringNullTerminated(TextEncodedStringSizeTerminated object)
           
 
Method Summary
 PairedTextEncodedStringNullTerminated.ValuePairs getValue()
          Get value held by this Object
 void readByteArray(byte[] arr, int offset)
          Read Null Terminated Strings from the array starting at offset, continue until unable to find any null terminated Strings or until reached the end of the array.
 
Methods inherited from class org.jaudiotagger.tag.datatype.MultipleTextEncodedStringNullTerminated
canBeEncoded, equals, getSize, writeByteArray
 
Methods inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
createStructure, getBody, getIdentifier, readByteArray, setBody, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PairedTextEncodedStringNullTerminated

public PairedTextEncodedStringNullTerminated(java.lang.String identifier,
                                             AbstractTagFrameBody frameBody)

PairedTextEncodedStringNullTerminated

public PairedTextEncodedStringNullTerminated(TextEncodedStringSizeTerminated object)

PairedTextEncodedStringNullTerminated

public PairedTextEncodedStringNullTerminated(PairedTextEncodedStringNullTerminated object)
Method Detail

readByteArray

public void readByteArray(byte[] arr,
                          int offset)
                   throws InvalidDataTypeException
Read Null Terminated Strings from the array starting at offset, continue until unable to find any null terminated Strings or until reached the end of the array. The offset should be set to byte after the last null terminated String found.

Overrides:
readByteArray in class MultipleTextEncodedStringNullTerminated
Parameters:
arr - to read the Strings from
offset - in the array to start reading from
Throws:
InvalidDataTypeException - if unable to find any null terminated Strings or if find odd number of Strings

getValue

public PairedTextEncodedStringNullTerminated.ValuePairs getValue()
Description copied from class: AbstractDataType
Get value held by this Object

Overrides:
getValue in class AbstractDataType
Returns:
value held by this Object