public class ParserUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BIT_IN_BYTE |
| Constructor and Description |
|---|
ParserUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getBytes(long val,
long size)
method to encode long as byte array of given size
|
static byte[] |
parseBinary(InputStream inputStream,
int size)
method to parse byte array
|
static double |
parseFloat(InputStream inputStream,
int size)
method used to parse float and double
|
static long |
parseInteger(InputStream inputStream,
int size)
method used to parse : int, uint and date
|
static ArrayList<Tag> |
parseMasterElement(InputStream inputStream,
int size)
method used to parse subelements of
CompoundTag |
static String |
parseString(InputStream inputStream,
int size)
method used to parse string
|
static Tag |
parseTag(InputStream inputStream)
parsing tag by matroska specification matroska spec
tag = VINT id, VINT size, data
|
static VINT |
readVINT(InputStream inputStream)
method to parse
VINT |
static void |
skip(long size,
InputStream input)
method to skip given amount of bytes in stream
|
public static final int BIT_IN_BYTE
public static long parseInteger(InputStream inputStream, int size) throws IOException
inputStream - - stream to get valuesize - - size of the value in bytesIOException - - in case of IO errorpublic static String parseString(InputStream inputStream, int size) throws IOException
inputStream - - stream to get valuesize - - size of the value in bytesStringIOException - - in case of IO errorpublic static double parseFloat(InputStream inputStream, int size) throws IOException
inputStream - - stream to get valuesize - - size of the value in bytesIOException - - in case of IO errorpublic static ArrayList<Tag> parseMasterElement(InputStream inputStream, int size) throws IOException, ConverterException
CompoundTaginputStream - - stream to get valuesize - - size of the value in bytesIOException - - in case of IO errorConverterException - - in case of any conversion exceptionpublic static byte[] parseBinary(InputStream inputStream, int size) throws IOException
inputStream - - stream to get valuesize - - size of the value in bytesIOException - - in case of IO errorpublic static VINT readVINT(InputStream inputStream) throws IOException
VINTinputStream - - stream to get valueIOException - - in case of IO errorpublic static Tag parseTag(InputStream inputStream) throws IOException, ConverterException
inputStream - - stream to get valueIOException - - in case of IO errorConverterException - - in case of any conversion exceptionpublic static byte[] getBytes(long val,
long size)
val - - value to encodesize - - sizepublic static void skip(long size,
InputStream input)
throws IOException
size - - size to skipinput - - input stream to processIOException - - in case of IO errorCopyright © 2005–2017 Red5. All rights reserved.