|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.coremedia.iso.boxes.AbstractBox
com.coremedia.iso.boxes.sampleentry.SampleEntry
public abstract class SampleEntry
Abstract base class for all sample entries.
AudioSampleEntry
,
VisualSampleEntry
,
TextSampleEntry
Field Summary | |
---|---|
protected List<Box> |
boxes
|
Fields inherited from class com.coremedia.iso.boxes.AbstractBox |
---|
deadBytes, type |
Constructor Summary | |
---|---|
protected |
SampleEntry(String type)
|
Method Summary | ||
---|---|---|
void |
_parseChildBoxes(ByteBuffer content)
|
|
void |
_parseReservedAndDataReferenceIndex(ByteBuffer content)
|
|
void |
_writeChildBoxes(ByteBuffer bb)
|
|
void |
_writeReservedAndDataReferenceIndex(ByteBuffer bb)
|
|
void |
addBox(AbstractBox b)
|
|
List<Box> |
getBoxes()
Gets all child boxes. |
|
|
getBoxes(Class<T> clazz)
Gets all child boxes of the given type. |
|
|
getBoxes(Class<T> clazz,
boolean recursive)
Gets all child boxes of the given type. |
|
int |
getDataReferenceIndex()
|
|
long |
getNumOfBytesToFirstChild()
Returns the number of bytes from the start of the box to start of the first child. |
|
void |
parse(ReadableByteChannel in,
ByteBuffer header,
long contentSize,
BoxParser boxParser)
Pareses the given IsoBufferWrapper and returns the remaining bytes. |
|
boolean |
removeBox(Box b)
|
|
void |
setBoxes(List<Box> boxes)
Sets all boxes and removes all previous child boxes. |
|
void |
setDataReferenceIndex(int dataReferenceIndex)
|
|
void |
setType(String type)
|
Methods inherited from class com.coremedia.iso.boxes.AbstractBox |
---|
_parseDetails, getBox, getContent, getContentSize, getDeadBytes, getHeader, getIsoFile, getParent, getSize, getType, getUserType, isParsed, parseDetails, setDeadBytes, setParent, setUserType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.coremedia.iso.boxes.ContainerBox |
---|
getIsoFile, getParent |
Methods inherited from interface com.coremedia.iso.boxes.Box |
---|
getBox, getSize, getType, setParent |
Field Detail |
---|
protected List<Box> boxes
Constructor Detail |
---|
protected SampleEntry(String type)
Method Detail |
---|
public void setType(String type)
public int getDataReferenceIndex()
public void setDataReferenceIndex(int dataReferenceIndex)
public void setBoxes(List<Box> boxes)
ContainerBox
setBoxes
in interface ContainerBox
boxes
- the new list of childrenpublic void addBox(AbstractBox b)
public boolean removeBox(Box b)
public List<Box> getBoxes()
ContainerBox
null
.
getBoxes
in interface ContainerBox
public <T extends Box> List<T> getBoxes(Class<T> clazz, boolean recursive)
ContainerBox
null
.
getBoxes
in interface ContainerBox
clazz
- child box's typerecursive
- step down the tree
public <T extends Box> List<T> getBoxes(Class<T> clazz)
ContainerBox
null
.
getBoxes
in interface ContainerBox
clazz
- child box's type
public void parse(ReadableByteChannel in, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
AbstractBox
parse
in interface Box
parse
in class AbstractBox
in
- the (part of the) iso file to parsecontentSize
- expected contentSize of the boxboxParser
- creates inner boxes
IOException
- in case of an I/O error.public void _parseReservedAndDataReferenceIndex(ByteBuffer content)
public void _parseChildBoxes(ByteBuffer content)
public void _writeReservedAndDataReferenceIndex(ByteBuffer bb)
public void _writeChildBoxes(ByteBuffer bb) throws IOException
IOException
public long getNumOfBytesToFirstChild()
ContainerBox
getNumOfBytesToFirstChild
in interface ContainerBox
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |