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, skip
public ByteArrayInputStream(InputStream inputStream)
public ByteArrayInputStream(byte[] bytes)
public int readInteger(int length) throws IOException
IOException
public long readLong(int length) throws IOException
IOException
public String readString(int length) throws IOException
IOException
public String readLengthEncodedString() throws IOException
IOException
public String readZeroTerminatedString() throws IOException
IOException
public byte[] read(int length) throws IOException
IOException
public void fill(byte[] bytes, int offset, int length) throws IOException
IOException
public BitSet readBitSet(int length, boolean bigEndian) throws IOException
IOException
public int readPackedInteger() throws IOException
IOException
readPackedNumber()
public Number readPackedNumber() throws IOException
IOException
public int available() throws IOException
available
in class InputStream
IOException
public int peek() throws IOException
IOException
public int read() throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public void enterBlock(int length)
public void skipToTheEndOfTheBlock() throws IOException
IOException
Copyright © 2020. All rights reserved.