Package org.red5.io.matroska.dtd
Class SimpleBlock
- java.lang.Object
-
- org.red5.io.matroska.dtd.Tag
-
- org.red5.io.matroska.dtd.SimpleBlock
-
public class SimpleBlock extends Tag
Tag representing complex block of different tags
-
-
Constructor Summary
Constructors Constructor Description SimpleBlock(String name, VINT id)ConstructorSimpleBlock(String name, VINT id, VINT size, InputStream inputStream)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBinary()getter for binarylonggetTimeCode()getter for time codeintgetTrackNumber()getter for track numberbooleanisKeyFrame()getter for key framevoidparse(InputStream inputStream)method to read and to parse tag from inputStream givenprotected voidputValue(ByteBuffer bb)method to store tag value toByteBuffergivenStringtoString()method to get "pretty" representedTag
-
-
-
Constructor Detail
-
SimpleBlock
public SimpleBlock(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)
-
SimpleBlock
public SimpleBlock(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
-
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)
-
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)
-
getBinary
public byte[] getBinary()
getter for binary- Returns:
- - binary
-
getTimeCode
public long getTimeCode()
getter for time code- Returns:
- - time code
-
getTrackNumber
public int getTrackNumber()
getter for track number- Returns:
- - track number
-
isKeyFrame
public boolean isKeyFrame()
getter for key frame- Returns:
- - key frame
-
-