Package org.jboss.jandex
Class PackedDataInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.DataInputStream
-
- org.jboss.jandex.PackedDataInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.lang.AutoCloseable
class PackedDataInputStream extends java.io.DataInputStream
An input stream that reads integers that were packed byPackedDataOutputStream
Thread-Safety
This class is not thread-safe can not be shared between threads.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
MAX_1BYTE
-
Constructor Summary
Constructors Constructor Description PackedDataInputStream(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
readPackedU32()
Reads a packed unsigned integer.-
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
-
-
-
Field Detail
-
MAX_1BYTE
static final int MAX_1BYTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
readPackedU32
public int readPackedU32() throws java.io.IOException
Reads a packed unsigned integer. Every byte uses the first bit as a control bit to signal when there are additional bytes to be read. The remaining seven bits are data. Depending on the size of the number one to five bytes may be read.- Returns:
- the unpacked integer
- Throws:
java.io.IOException
-
-