Package org.red5.io.matroska.dtd
Class StringTag
- java.lang.Object
-
- org.red5.io.matroska.dtd.Tag
-
- org.red5.io.matroska.dtd.StringTag
-
public class StringTag extends Tag
http://matroska.org/technical/specs/index.html String tag is class able to store strings
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetValue()getter for valuevoidparse(InputStream inputStream)method to read and to parse tag from inputStream givenprotected voidputValue(ByteBuffer bb)method to store tag value toByteBuffergivenStringTagsetValue(String value)setter for value, updates the size of this tagStringtoString()method to get "pretty" representedTag
-
-
-
Constructor Detail
-
StringTag
public StringTag(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)
-
StringTag
public StringTag(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 String getValue()
getter for value- Returns:
- - value
-
setValue
public StringTag setValue(String value) throws UnsupportedEncodingException
setter for value, updates the size of this tag- Parameters:
value- - value to be set- Returns:
- - this for chaining
- Throws:
UnsupportedEncodingException- - in case UTF-8 encoding is not supported
-
-