PackedDataOutputStream
Thread-Safety
This class is not thread-safe can not be shared between threads.| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | writePackedU32(int
the integer to pack and write i)Writes an unsigned integer in as few bytes as possible. |
| MAX_1BYTE | back to summary |
|---|---|
| pack-priv static final int MAX_1BYTE | |
| MAX_2BYTE | back to summary |
|---|---|
| pack-priv static final int MAX_2BYTE | |
| MAX_3BYTE | back to summary |
|---|---|
| pack-priv static final int MAX_3BYTE | |
| MAX_4BYTE | back to summary |
|---|---|
| pack-priv static final int MAX_4BYTE | |
| PackedDataOutputStream | back to summary |
|---|---|
| public PackedDataOutputStream(OutputStream out) | |
| writePackedU32 | back to summary |
|---|---|
| public void writePackedU32(int i) throws IOException Writes an unsigned integer in as few bytes as possible. Every byte uses the first bit as a control bit to signal when there are additional bytes to be read on the receiving end. The remaining seven bits are data. Depending on the size of the number one to five bytes may be written. The bytes are written in network-order (big endian) Note that a signed integer can still be used, but due to two's compliment, all negative values will be written as five bytes
| |