com.liferay.portlet.documentlibrary.util
Class Atom

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.util.Atom

public class Atom
extends java.lang.Object

Atoms are self-contained data units in that contain information about an MP4 movie file.

Author:
Juan González
See Also:
JQTFastStart

Field Summary
static java.lang.String CMOV
           
static java.lang.String CO64
           
static java.lang.String FREE
           
static java.lang.String FTYP
           
static java.lang.String JUNK
           
static java.lang.String MDAT
           
static java.lang.String MOOV
           
static java.lang.String PICT
           
static java.lang.String PNOT
           
static java.lang.String SKIP
           
static java.lang.String STCO
           
static java.lang.String[] TOP_LEVEL_ATOMS
           
static java.lang.String WIDE
           
 
Constructor Summary
Atom(java.io.RandomAccessFile randomAccessFile)
           
 
Method Summary
protected  long bytesToLong(byte[] buffer)
           
 void fillBuffer(java.io.RandomAccessFile randomAccessFile)
           
 byte[] getBuffer()
           
 long getOffset()
           
 long getSize()
           
 java.lang.String getType()
           
protected  boolean hasCompressedMoovAtom()
           
 boolean isFTYP()
           
 boolean isMDAT()
           
 boolean isMOOV()
           
 boolean isTopLevelAtom()
           
 void patchAtom()
           
protected  int patchCo64Atom(int index)
           
protected  int patchStcoAtom(int index)
           
 void setBuffer(byte[] buffer)
           
 void setOffset(long offset)
           
 void setSize(long size)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMOV

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

CO64

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

FREE

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

FTYP

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

JUNK

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

MDAT

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

MOOV

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

PICT

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

PNOT

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

SKIP

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

STCO

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

TOP_LEVEL_ATOMS

public static final java.lang.String[] TOP_LEVEL_ATOMS

WIDE

public static final java.lang.String WIDE
See Also:
Constant Field Values
Constructor Detail

Atom

public Atom(java.io.RandomAccessFile randomAccessFile)
     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

fillBuffer

public void fillBuffer(java.io.RandomAccessFile randomAccessFile)
                throws java.io.IOException
Throws:
java.io.IOException

getBuffer

public byte[] getBuffer()

getOffset

public long getOffset()

getSize

public long getSize()

getType

public java.lang.String getType()

isFTYP

public boolean isFTYP()

isMDAT

public boolean isMDAT()

isMOOV

public boolean isMOOV()

isTopLevelAtom

public boolean isTopLevelAtom()

patchAtom

public void patchAtom()

setBuffer

public void setBuffer(byte[] buffer)

setOffset

public void setOffset(long offset)

setSize

public void setSize(long size)

setType

public void setType(java.lang.String type)

bytesToLong

protected long bytesToLong(byte[] buffer)

hasCompressedMoovAtom

protected boolean hasCompressedMoovAtom()

patchCo64Atom

protected int patchCo64Atom(int index)

patchStcoAtom

protected int patchStcoAtom(int index)