org.jaudiotagger.tag.mp4.field
Class Mp4TagTextNumberField

java.lang.Object
  extended by org.jaudiotagger.tag.mp4.Mp4TagField
      extended by org.jaudiotagger.tag.mp4.field.Mp4TagTextField
          extended by org.jaudiotagger.tag.mp4.field.Mp4TagTextNumberField
All Implemented Interfaces:
TagField, TagTextField
Direct Known Subclasses:
Mp4DiscNoField, Mp4GenreField, Mp4TrackField

public class Mp4TagTextNumberField
extends Mp4TagTextField

Represents simple text field that contains an array of number,

But reads the data content as an array of 16 bit unsigned numbers


Field Summary
static int NUMBER_LENGTH
           
protected  java.util.List<java.lang.Short> numbers
           
 
Fields inherited from class org.jaudiotagger.tag.mp4.field.Mp4TagTextField
content, dataSize
 
Fields inherited from class org.jaudiotagger.tag.mp4.Mp4TagField
id, logger, parentHeader
 
Constructor Summary
Mp4TagTextNumberField(java.lang.String id, java.nio.ByteBuffer data)
           
Mp4TagTextNumberField(java.lang.String id, java.lang.String numberArray)
          Create a new number, already parsed in subclasses
 
Method Summary
protected  void build(java.nio.ByteBuffer data)
          Processes the data and sets the position of the data buffer to just after the end of this fields data ready for processing next field.
 void copyContent(TagField field)
          This method copies the data of the given field to the current data.
protected  byte[] getDataBytes()
          Recreate the raw data content from the list of numbers
 Mp4FieldType getFieldType()
           
 java.util.List<java.lang.Short> getNumbers()
           
 
Methods inherited from class org.jaudiotagger.tag.mp4.field.Mp4TagTextField
getContent, getEncoding, isBinary, isEmpty, setContent, setEncoding, toString
 
Methods inherited from class org.jaudiotagger.tag.mp4.Mp4TagField
getId, getIdBytes, getRawContent, getRawContentDataOnly, isBinary, isCommon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jaudiotagger.tag.TagField
getId, getRawContent, isBinary, isCommon
 

Field Detail

NUMBER_LENGTH

public static final int NUMBER_LENGTH
See Also:
Constant Field Values

numbers

protected java.util.List<java.lang.Short> numbers
Constructor Detail

Mp4TagTextNumberField

public Mp4TagTextNumberField(java.lang.String id,
                             java.lang.String numberArray)
Create a new number, already parsed in subclasses

Parameters:
id -
numberArray -

Mp4TagTextNumberField

public Mp4TagTextNumberField(java.lang.String id,
                             java.nio.ByteBuffer data)
                      throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException
Method Detail

getDataBytes

protected byte[] getDataBytes()
Recreate the raw data content from the list of numbers

Overrides:
getDataBytes in class Mp4TagTextField
Returns:

copyContent

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

Specified by:
copyContent in interface TagField
Overrides:
copyContent in class Mp4TagTextField
Parameters:
field - The field containing the data to be taken.

getFieldType

public Mp4FieldType getFieldType()
Overrides:
getFieldType in class Mp4TagTextField
Returns:
type numeric

build

protected void build(java.nio.ByteBuffer data)
              throws java.io.UnsupportedEncodingException
Description copied from class: Mp4TagField
Processes the data and sets the position of the data buffer to just after the end of this fields data ready for processing next field.

Overrides:
build in class Mp4TagTextField
Throws:
java.io.UnsupportedEncodingException

getNumbers

public java.util.List<java.lang.Short> getNumbers()
Returns:
the individual numbers making up this field