public class AtomParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
ftypes
Array holding defined ftyp tags.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static AtomParser |
createForFile(java.io.File atomFile)
Creates an AtomParser instance to parse data from the given file.
|
static AtomParser |
createForType(java.lang.String ftyp)
Creates an AtomParser instance for the given type to read from raw data.
|
void |
dump()
Dumps the atom tree read from the file the parser has been initialized with to the current log stream.
|
void |
dump(Atom atom)
Dumps the given Atom and all its child atoms to the current log stream.
|
void |
dump(byte[] rawData,
int startPos)
Dumps the atom tree read from the given byte array at %startPos to the current log stream.
|
protected void |
finalize() |
Atom |
getAtom(java.lang.String atomID,
Atom parentAtom)
Returns the atom with the given ID from parentAtom's data or null if not found
|
Atom |
getAtom(java.lang.String atomID,
byte[] data,
int offset)
Returns the first atom with the given ID within the given raw data.
|
Atom |
getAtom(java.lang.String atomID,
int offset)
Returns the first atom with the given ID starting at offset within the file the parser has been initialized with.
|
public static java.lang.String[] ftypes
public static AtomParser createForType(java.lang.String ftyp) throws DSJException
DSJException
public static AtomParser createForFile(java.io.File atomFile) throws java.io.IOException
java.io.IOException
public void close()
protected void finalize()
finalize
in class java.lang.Object
public Atom getAtom(java.lang.String atomID, byte[] data, int offset)
public Atom getAtom(java.lang.String atomID, int offset) throws java.lang.Exception
java.lang.Exception
public Atom getAtom(java.lang.String atomID, Atom parentAtom)
public void dump() throws java.lang.Exception
java.lang.Exception
public void dump(byte[] rawData, int startPos) throws java.lang.Exception
java.lang.Exception
public void dump(Atom atom)