de.humatic.dsj.util
Class Atom

java.lang.Object
  extended by de.humatic.dsj.util.Atom

public class Atom
extends java.lang.Object

Atoms are data units used in atomic file types inheriting from the original Quicktime file format (like ISO MPEG4). Atoms have size, type and data fields and may contain nested child atoms. They are read from files or raw data by AtomParsers and can not be constructed directly.


Method Summary
 Atom getChildByIndex(int idx)
           
 byte[] getData()
          Returns the Atom's raw data, which may consist of child atom's
 java.lang.String getID()
          Returns the Atom's four char code ID string
 Atom getNextChild(Atom currentChild)
          Returns the child atom following currentChild in this atom's data.
 Atom getParent()
           
 int getSize()
          Returns the Atom's data size.
 int getType()
          Returns the Atom's four char code as an int.
 boolean isContainer()
          Returns true if this is a known container atom that might contain child atoms.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isContainer

public boolean isContainer()
Returns true if this is a known container atom that might contain child atoms.


getParent

public Atom getParent()

getSize

public int getSize()
Returns the Atom's data size. The total size of the atom is 8 bytes larger.


getType

public int getType()
Returns the Atom's four char code as an int.


getID

public java.lang.String getID()
Returns the Atom's four char code ID string


getData

public byte[] getData()
Returns the Atom's raw data, which may consist of child atom's


getChildByIndex

public Atom getChildByIndex(int idx)

getNextChild

public Atom getNextChild(Atom currentChild)
Returns the child atom following currentChild in this atom's data. Returns the first child if %currentChild is null or null if this is not a container atom.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object