org.jaudiotagger.tag.mp4.field
Class Mp4DiscNoField

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
              extended by org.jaudiotagger.tag.mp4.field.Mp4DiscNoField
All Implemented Interfaces:
TagField, TagTextField

public class Mp4DiscNoField
extends Mp4TagTextNumberField

Represents the Disc No field

Contains some reserved fields that we currently ignore Reserved:2 bytes Disc Number:2 bytes Total no of Discs:2 bytes


Field Summary
private static int DISC_NO_INDEX
           
private static int DISC_TOTAL_INDEX
           
private static int NONE_VALUE_INDEX
           
 
Fields inherited from class org.jaudiotagger.tag.mp4.field.Mp4TagTextNumberField
NUMBER_LENGTH, 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
Mp4DiscNoField(int discNo)
          Create new Disc No field with only discNo
Mp4DiscNoField(int discNo, int total)
          Create new Disc No Field with Disc No and total number of discs
Mp4DiscNoField(java.lang.String discValue)
          Create new Disc Field parsing the String for the discno/total
Mp4DiscNoField(java.lang.String id, java.nio.ByteBuffer data)
           
 
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.
 java.lang.Short getDiscNo()
           
 java.lang.Short getDiscTotal()
           
 void setDiscNo(int discNo)
          Set Disc No
 void setDiscTotal(int discTotal)
          Set total number of discs
 
Methods inherited from class org.jaudiotagger.tag.mp4.field.Mp4TagTextNumberField
copyContent, getDataBytes, getFieldType, 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

NONE_VALUE_INDEX

private static final int NONE_VALUE_INDEX
See Also:
Constant Field Values

DISC_NO_INDEX

private static final int DISC_NO_INDEX
See Also:
Constant Field Values

DISC_TOTAL_INDEX

private static final int DISC_TOTAL_INDEX
See Also:
Constant Field Values
Constructor Detail

Mp4DiscNoField

public Mp4DiscNoField(java.lang.String discValue)
               throws FieldDataInvalidException
Create new Disc Field parsing the String for the discno/total

Parameters:
discValue -
Throws:
FieldDataInvalidException

Mp4DiscNoField

public Mp4DiscNoField(int discNo)
Create new Disc No field with only discNo

Parameters:
discNo -

Mp4DiscNoField

public Mp4DiscNoField(int discNo,
                      int total)
Create new Disc No Field with Disc No and total number of discs

Parameters:
discNo -
total -

Mp4DiscNoField

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

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 Mp4TagTextNumberField
Throws:
java.io.UnsupportedEncodingException

getDiscNo

public java.lang.Short getDiscNo()
Returns:

setDiscNo

public void setDiscNo(int discNo)
Set Disc No

Parameters:
discNo -

getDiscTotal

public java.lang.Short getDiscTotal()
Returns:

setDiscTotal

public void setDiscTotal(int discTotal)
Set total number of discs

Parameters:
discTotal -