|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.coremedia.iso.boxes.AbstractBox
public abstract class AbstractBox
A basic ISO box. No full box.
Field Summary | |
---|---|
protected ByteBuffer |
deadBytes
|
protected String |
type
|
Constructor Summary | |
---|---|
protected |
AbstractBox(String type)
|
Method Summary | |
---|---|
abstract void |
_parseDetails(ByteBuffer content)
Implement the actual parsing of the box's fields here. |
void |
getBox(WritableByteChannel os)
|
protected abstract void |
getContent(ByteBuffer bb)
Writes the box's content into the given ByteBuffer . |
protected abstract long |
getContentSize()
Gets the box's content size. |
ByteBuffer |
getDeadBytes()
|
void |
getHeader(ByteBuffer byteBuffer)
|
IsoFile |
getIsoFile()
|
ContainerBox |
getParent()
|
long |
getSize()
|
String |
getType()
|
byte[] |
getUserType()
|
boolean |
isParsed()
|
void |
parse(ReadableByteChannel in,
ByteBuffer header,
long contentSize,
BoxParser boxParser)
Pareses the given IsoBufferWrapper and returns the remaining bytes. |
void |
parseDetails()
Parses the boxes fields. |
void |
setDeadBytes(ByteBuffer newDeadBytes)
|
void |
setParent(ContainerBox parent)
|
void |
setUserType(byte[] userType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String type
protected ByteBuffer deadBytes
Constructor Detail |
---|
protected AbstractBox(String type)
Method Detail |
---|
public long getSize()
getSize
in interface Box
public boolean isParsed()
protected abstract long getContentSize()
@DoNotParseDetail public String getType()
getType
in interface Box
@DoNotParseDetail public byte[] getUserType()
@DoNotParseDetail public void setUserType(byte[] userType)
@DoNotParseDetail public ContainerBox getParent()
getParent
in interface Box
@DoNotParseDetail public void setParent(ContainerBox parent)
setParent
in interface Box
@DoNotParseDetail public IsoFile getIsoFile()
@DoNotParseDetail public void parse(ReadableByteChannel in, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
parse
in interface Box
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 final void parseDetails()
public abstract void _parseDetails(ByteBuffer content)
parseDetails()
which encapsulates the call to this method with some safeguards.
content
- public ByteBuffer getDeadBytes()
public void setDeadBytes(ByteBuffer newDeadBytes)
public void getHeader(ByteBuffer byteBuffer)
public void getBox(WritableByteChannel os) throws IOException
getBox
in interface Box
IOException
protected abstract void getContent(ByteBuffer bb) throws IOException
ByteBuffer
. This must include flags
and version in case of a full box. bb
has been initialized with
getSize()
bytes.
bb
- the box's content-sink.
IOException
- in case of an exception in the underlying OutputStream
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |