Package org.red5.io.matroska.dtd
Class FloatTag
- java.lang.Object
-
- org.red5.io.matroska.dtd.Tag
-
- org.red5.io.matroska.dtd.FloatTag
-
public class FloatTag extends Tag
http://matroska.org/technical/specs/index.html Float tag is class able to store 4 byte float or 8 byte double, stores double by default
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetValue()getter for value as doublevoidparse(InputStream inputStream)method to read and to parse tag from inputStream givenprotected voidputValue(ByteBuffer bb)method to store tag value toByteBuffergivenFloatTagsetValue(double value)setter for value, updates the size of this tagStringtoString()method to get "pretty" representedTag
-
-
-
Constructor Detail
-
FloatTag
public FloatTag(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)
-
FloatTag
public FloatTag(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
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 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)
-
getValue
public double getValue()
getter for value as double- Returns:
- - value as double
-
setValue
public FloatTag setValue(double value)
setter for value, updates the size of this tag- Parameters:
value- - value to be set- Returns:
- - this for chaining
-
-