class PackedDataOutputStream
extends java.io.DataOutputStream
PackedDataOutputStream
Thread-Safety
This class is not thread-safe can not be shared between threads.| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
MAX_1BYTE |
(package private) static int |
MAX_2BYTE |
(package private) static int |
MAX_3BYTE |
(package private) static int |
MAX_4BYTE |
| Constructor and Description |
|---|
PackedDataOutputStream(java.io.OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
void |
writePackedU32(int i)
Writes an unsigned integer in as few bytes as possible.
|
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFstatic final int MAX_1BYTE
static final int MAX_2BYTE
static final int MAX_3BYTE
static final int MAX_4BYTE
public void writePackedU32(int i)
throws java.io.IOException
Note that a signed integer can still be used, but due to two's compliment, all negative values will be written as five bytes
i - the integer to pack and writejava.io.IOException - if any i/o error occurs