public class ByteArrayInputStream extends InputStream
| Constructor and Description |
|---|
ByteArrayInputStream(byte[] bytes) |
ByteArrayInputStream(InputStream inputStream) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
enterBlock(int length) |
void |
fill(byte[] bytes,
int offset,
int length) |
int |
peek() |
int |
read() |
byte[] |
read(int length) |
BitSet |
readBitSet(int length,
boolean bigEndian) |
int |
readInteger(int length)
Read int written in little-endian format.
|
String |
readLengthEncodedString()
Read variable-length string.
|
long |
readLong(int length)
Read long written in little-endian format.
|
int |
readPackedInteger() |
Number |
readPackedNumber()
Format (first-byte-based):
0-250 - The first byte is the number (in the range 0-250). |
String |
readString(int length)
Read fixed length string.
|
String |
readZeroTerminatedString()
Read variable-length string.
|
void |
skipToTheEndOfTheBlock() |
mark, markSupported, read, read, reset, skippublic ByteArrayInputStream(InputStream inputStream)
public ByteArrayInputStream(byte[] bytes)
public int readInteger(int length)
throws IOException
IOExceptionpublic long readLong(int length)
throws IOException
IOExceptionpublic String readString(int length) throws IOException
IOExceptionpublic String readLengthEncodedString() throws IOException
IOExceptionpublic String readZeroTerminatedString() throws IOException
IOExceptionpublic byte[] read(int length)
throws IOException
IOExceptionpublic void fill(byte[] bytes,
int offset,
int length)
throws IOException
IOExceptionpublic BitSet readBitSet(int length, boolean bigEndian) throws IOException
IOExceptionpublic int readPackedInteger()
throws IOException
IOExceptionreadPackedNumber()public Number readPackedNumber() throws IOException
IOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic int peek()
throws IOException
IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic void enterBlock(int length)
public void skipToTheEndOfTheBlock()
throws IOException
IOExceptionCopyright © 2019. All rights reserved.