public final class BitInputStream extends FilterInputStream
in
Constructor and Description |
---|
BitInputStream(InputStream in)
Constructs a bit input stream from an InputStream object.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
read(int length)
Read specific number of bytes from the input stream.
|
int |
readSBits(int numBits)
Read a signed value from the given number of bits
|
long |
readUBits(int numBits)
Read an unsigned value from the given number of bits.
|
int |
readUI8()
Read an unsigned 8 bit value.
|
int[] |
readUI8(int length)
Read specific number of unsigned bytes from the input stream.
|
available, close, mark, markSupported, read, read, read, reset, skip
public BitInputStream(InputStream in)
in
- input stream that will be wrappedpublic int readUI8() throws IOException
IOException
public int[] readUI8(int length) throws IOException
length
- number of bytes to read and return as integersIOException
public byte[] read(int length) throws IOException
length
- number of bytes to readIOException
public long readUBits(int numBits) throws IOException
numBits
- number of bits used for the unsigned valueIOException
public int readSBits(int numBits) throws IOException
numBits
- number of bits used for the signed valueIOException
Copyright © 2006–2019 GeoSolutions. All rights reserved.