public abstract class Tag extends Object
| Constructor and Description |
|---|
Tag(String name,
VINT id)
Constructor, internally calls
Tag(String, VINT, VINT, InputStream) to create tag with 0 size |
Tag(String name,
VINT id,
VINT size,
InputStream inputStream)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encode()
method to encode
Tag as sequence of bytes |
long |
getId()
getter for id
|
String |
getName()
getter for name
|
long |
getSize()
getter for size
|
void |
parse()
method to parse tag from inner bytes array - data
|
abstract void |
parse(InputStream inputStream)
method to read and to parse tag from inputStream given
|
protected abstract void |
putValue(ByteBuffer bb)
method to store tag value to
ByteBuffer given |
void |
readData(InputStream inputStream)
method to read tag data from inputStream given
|
String |
toString()
method to get "pretty" represented
Tag |
int |
totalSize()
method to get total size of this tag: "header" + "contents"
|
public Tag(String name, VINT id) throws IOException
Tag(String, VINT, VINT, InputStream) to create tag with 0 sizename - - the name of tag to be createdid - - the id of tag to be createdIOException - - in case of IO errorpublic Tag(String name, VINT id, VINT size, InputStream inputStream) throws IOException
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 fromIOException - - in case of any IO errorspublic abstract void parse(InputStream inputStream) throws IOException, ConverterException
inputStream - - stream to parse tag data fromIOException - - in case of any IO errorsConverterException - - in case of any conversion errorspublic void parse()
throws IOException,
ConverterException
IOException - - in case of any IO errorsConverterException - - in case of any conversion errorspublic void readData(InputStream inputStream) throws IOException
IOException - - in case of any IO errorsprotected abstract void putValue(ByteBuffer bb) throws IOException
ByteBuffer givenbb - - ByteBuffer to store valueIOException - - in case of any IO errorspublic long getId()
public long getSize()
public int totalSize()
public byte[] encode()
throws IOException
Tag as sequence of bytesTagIOException - - in case of any IO errorsCopyright © 2005–2017 Red5. All rights reserved.