Package org.red5.io.matroska.dtd
Class CompoundTag
- java.lang.Object
-
- org.red5.io.matroska.dtd.Tag
-
- org.red5.io.matroska.dtd.CompoundTag
-
public class CompoundTag extends Tag
-
-
Constructor Summary
Constructors Constructor Description CompoundTag(String name, VINT id)ConstructorCompoundTag(String name, VINT id, VINT size, InputStream inputStream)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundTagadd(Tag ch)method to add child tag to thisCompoundTag, updates the size on addTagget(String tagName)intgetNumberOfSubElements()voidparse(InputStream inputStream)method to read and to parse tag from inputStream givenprotected voidputValue(ByteBuffer bb)method to store tag value toByteBuffergivenvoidreadData(InputStream inputStream)method to read tag data from inputStream givenStringtoString()method to get "pretty" representedTaginttotalSize()method to get total size of this tag: "header" + "contents"
-
-
-
Constructor Detail
-
CompoundTag
public CompoundTag(String name, VINT id) throws IOException
Constructor- Parameters:
name- - the name of tag to be createdid- - the id of tag to be created- Throws:
IOException- - in case of IO error- See Also:
Tag(String, VINT)
-
CompoundTag
public CompoundTag(String name, VINT id, VINT size, InputStream inputStream) throws IOException
Constructor- Parameters:
name- - the name of tag to be createdid- - the id of tag to be createdsize- - the size of tag to be createdinputStream- - stream to read tag data from- Throws:
IOException- - in case of IO error- See Also:
Tag(String, VINT, VINT, InputStream)
-
-
Method Detail
-
readData
public void readData(InputStream inputStream) throws IOException
Description copied from class:Tagmethod to read tag data from inputStream given- Overrides:
readDatain classTag- Parameters:
inputStream- - stream to read tag data from- Throws:
IOException- - in case of any IO errors- See Also:
Tag.readData(InputStream)
-
parse
public void parse(InputStream inputStream) throws IOException, ConverterException
Description copied from class:Tagmethod to read and to parse tag from inputStream given- Specified by:
parsein classTag- Parameters:
inputStream- - stream to parse tag data from- Throws:
IOException- - in case of any IO errorsConverterException- - in case of any conversion errors- See Also:
Tag.parse(InputStream)
-
totalSize
public int totalSize()
Description copied from class:Tagmethod to get total size of this tag: "header" + "contents"
-
putValue
protected void putValue(ByteBuffer bb) throws IOException
Description copied from class:Tagmethod to store tag value toByteBuffergiven- Specified by:
putValuein classTag- Parameters:
bb- -ByteBufferto store value- Throws:
IOException- - in case of any IO errors- See Also:
Tag.putValue(ByteBuffer)
-
add
public CompoundTag add(Tag ch)
method to add child tag to thisCompoundTag, updates the size on add- Parameters:
ch- - childTagto be added- Returns:
- - this for chaining
-
getNumberOfSubElements
public int getNumberOfSubElements()
-
-