@Deprecated public class PackedInteger extends Object
PackedInteger
is a variable-length integer. The most-significant bit of each byte of a
PackedInteger
value indicates whether that byte is the final (lowest-order) byte of the value.
If the bit is 0, then this is the last byte; if the bit is 1, then there is at least one more subsequent
byte pending, and the current value should be shifted to the left by 7 bits to accommodate the next byte's data.
Note: PackedInteger
cannot hold signed integer values.Constructor and Description |
---|
PackedInteger()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static int |
readPackedInteger(DataInput input)
Deprecated.
Reads a
PackedInteger value from the passed input and returns the
value of the integer. |
static void |
writePackedInteger(DataOutput output,
int value)
Deprecated.
|
public static int readPackedInteger(DataInput input) throws IOException
PackedInteger
value from the passed input
and returns the
value of the integer.input
- The DataInput
from which the PackedInteger
value will be readIOException
IllegalArgumentException
- If the passed input
is nullpublic static void writePackedInteger(DataOutput output, int value) throws IOException
output
- The DataOutput
to which the PackedInteger
is written tovalue
- The integer value which will be converted to a PackedInteger
IOException
IllegalArgumentException
- If the passed value
is < 0. PackedInteger
doesn't
allow signed integerIllegalArgumentException
- If the passed output
is nullCopyright © 2018 JBoss by Red Hat. All rights reserved.