public abstract class CompactWriter extends Object
Constructor and Description |
---|
CompactWriter() |
Modifier and Type | Method and Description |
---|---|
static long |
encodeZigZag(long n) |
static int |
getNumberOfBytesSigned(long value) |
static int |
getNumberOfBytesUnsigned(long value) |
abstract void |
write(byte[] bytes) |
abstract void |
write(byte[] bytes,
int off,
int len) |
abstract void |
writeByte(int b) |
void |
writeInt(int value) |
void |
writeLong(long value) |
void |
writeString(String string) |
void |
writeVariableLengthSignedInteger(long value) |
void |
writeVariableLengthUnsignedInteger(long value) |
public abstract void writeByte(int b) throws IOException
IOException
public abstract void write(byte[] bytes) throws IOException
IOException
public abstract void write(byte[] bytes, int off, int len) throws IOException
IOException
public void writeVariableLengthUnsignedInteger(long value) throws IOException
IOException
public void writeVariableLengthSignedInteger(long value) throws IOException
IOException
public static long encodeZigZag(long n)
public static int getNumberOfBytesUnsigned(long value)
public static int getNumberOfBytesSigned(long value)
public void writeString(String string) throws IOException
IOException
public void writeInt(int value) throws IOException
IOException
public void writeLong(long value) throws IOException
IOException