Top Description Fields Constructors Methods
org.jboss.jandex

pack-priv Class PackedDataInputStream

extends DataInputStream
Class Inheritance
Imports
java.io.DataInputStream, .IOException, .InputStream

An input stream that reads integers that were packed by PackedDataOutputStream

Thread-Safety

This class is not thread-safe can not be shared between threads.
Author
Jason T. Greene

Field Summary

Modifier and TypeField and Description
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the unpacked integer
readPackedU32
()

Reads a packed unsigned integer.

Inherited from java.io.DataInputStream:
readreadreadBooleanreadBytereadCharreadDoublereadFloatreadFullyreadFullyreadIntreadLinereadLongreadShortreadUnsignedBytereadUnsignedShortreadUTFreadUTFskipBytes

Field Detail

MAX_1BYTEback to summary
pack-priv static final int MAX_1BYTE

Constructor Detail

PackedDataInputStreamback to summary
public PackedDataInputStream(InputStream in)

Method Detail

readPackedU32back to summary
public int readPackedU32() throws 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:int

the unpacked integer