org.jaudiotagger.tag.mp4.atom
Class Mp4DataBox

java.lang.Object
  extended by org.jaudiotagger.audio.mp4.atom.AbstractMp4Box
      extended by org.jaudiotagger.tag.mp4.atom.Mp4DataBox

public class Mp4DataBox
extends AbstractMp4Box

This box is used within both normal metadat boxes and ---- boxes to hold the actual data.

Format is as follows: :length (4 bytes) :name 'Data' (4 bytes) :atom version (1 byte) :atom type flags (3 bytes) :locale field (4 bytes) //Currently always zero :data


Field Summary
private  byte[] bytedata
           
private  java.lang.String content
           
static int DATA_HEADER_LENGTH
           
static java.lang.String IDENTIFIER
           
static int NULL_LENGTH
           
static int NUMBER_LENGTH
           
private  java.util.List<java.lang.Short> numbers
           
static int PRE_DATA_LENGTH
           
private  int type
           
static int TYPE_LENGTH
           
static int TYPE_POS
           
static int TYPE_POS_INCLUDING_HEADER
           
static int VERSION_LENGTH
           
 
Fields inherited from class org.jaudiotagger.audio.mp4.atom.AbstractMp4Box
dataBuffer, header
 
Constructor Summary
Mp4DataBox(Mp4BoxHeader header, java.nio.ByteBuffer dataBuffer)
           
 
Method Summary
 byte[] getByteData()
          Return raw byte data only vaid for byte fields
 java.lang.String getContent()
           
 java.util.List<java.lang.Short> getNumbers()
          Return numbers, only valid for numeric fields
 int getType()
           
 
Methods inherited from class org.jaudiotagger.audio.mp4.atom.AbstractMp4Box
getData, getHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values

VERSION_LENGTH

public static final int VERSION_LENGTH
See Also:
Constant Field Values

TYPE_LENGTH

public static final int TYPE_LENGTH
See Also:
Constant Field Values

NULL_LENGTH

public static final int NULL_LENGTH
See Also:
Constant Field Values

PRE_DATA_LENGTH

public static final int PRE_DATA_LENGTH
See Also:
Constant Field Values

DATA_HEADER_LENGTH

public static final int DATA_HEADER_LENGTH
See Also:
Constant Field Values

TYPE_POS

public static final int TYPE_POS
See Also:
Constant Field Values

TYPE_POS_INCLUDING_HEADER

public static final int TYPE_POS_INCLUDING_HEADER
See Also:
Constant Field Values

type

private int type

content

private java.lang.String content

NUMBER_LENGTH

public static final int NUMBER_LENGTH
See Also:
Constant Field Values

numbers

private java.util.List<java.lang.Short> numbers

bytedata

private byte[] bytedata
Constructor Detail

Mp4DataBox

public Mp4DataBox(Mp4BoxHeader header,
                  java.nio.ByteBuffer dataBuffer)
Parameters:
header - parentHeader info
dataBuffer - data of box (doesnt include parentHeader data)
Method Detail

getContent

public java.lang.String getContent()

getType

public int getType()

getNumbers

public java.util.List<java.lang.Short> getNumbers()
Return numbers, only valid for numeric fields

Returns:
numbers

getByteData

public byte[] getByteData()
Return raw byte data only vaid for byte fields

Returns:
byte data