public class ParserStream
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.nio.charset.Charset |
STRING_CHARSET_UTF16 |
protected static java.nio.charset.Charset |
STRING_CHARSET_UTF8 |
| Constructor and Description |
|---|
ParserStream(@NotNull java.io.InputStream inputStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkInt16(int expected,
java.lang.String error) |
void |
checkInt8(int expected,
java.lang.String error) |
void |
checkPos(long expectedOffset,
java.lang.String error) |
long |
getPos() |
void |
mark(int len) |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt16() |
int |
readInt32() |
int[] |
readInt32Array(int count) |
int |
readInt8() |
byte[] |
readInt8Array(int count) |
java.lang.String |
readString16Fixed(int len) |
long |
readUInt32() |
void |
reset() |
void |
skip(long count) |
void |
skipToPos(long expectedOffset,
java.lang.String error) |
java.lang.String |
toString() |
protected static final java.nio.charset.Charset STRING_CHARSET_UTF16
protected static final java.nio.charset.Charset STRING_CHARSET_UTF8
public ParserStream(@NotNull
@NotNull java.io.InputStream inputStream)
public long getPos()
public int readInt8()
throws java.io.IOException
java.io.IOExceptionpublic int readInt16()
throws java.io.IOException
java.io.IOExceptionpublic int readInt32()
throws java.io.IOException
java.io.IOExceptionpublic long readUInt32()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String readString16Fixed(int len)
throws java.io.IOException
java.io.IOExceptionpublic int[] readInt32Array(int count)
throws java.io.IOException
java.io.IOExceptionpublic byte[] readInt8Array(int count)
throws java.io.IOException
java.io.IOExceptionpublic void skip(long count)
throws java.io.IOException
java.io.IOExceptionpublic void checkInt8(int expected,
java.lang.String error)
throws java.io.IOException
java.io.IOExceptionpublic void checkInt16(int expected,
java.lang.String error)
throws java.io.IOException
java.io.IOExceptionpublic void checkPos(long expectedOffset,
java.lang.String error)
throws java.io.IOException
java.io.IOExceptionpublic void skipToPos(long expectedOffset,
java.lang.String error)
throws java.io.IOException
java.io.IOExceptionpublic void mark(int len)
throws java.io.IOException
java.io.IOExceptionpublic void reset()
throws java.io.IOException
java.io.IOExceptionpublic void readFully(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object