public class BinarySerializer extends Object
| Constructor and Description |
|---|
BinarySerializer(BuffedWriter writer,
boolean enableCompress) |
| Modifier and Type | Method and Description |
|---|---|
void |
flushToTarget(boolean force) |
void |
maybeDisableCompressed() |
void |
maybeEnableCompressed() |
void |
writeBoolean(boolean x) |
void |
writeByte(byte x) |
void |
writeBytes(byte[] bytes) |
void |
writeBytes(byte[] bytes,
int offset,
int length) |
void |
writeBytesBinary(byte[] bs) |
void |
writeDouble(double datum) |
void |
writeFloat(float datum) |
void |
writeInt(int i) |
void |
writeLong(long i) |
void |
writeShort(short i) |
void |
writeStringBinary(String data,
Charset charset) |
void |
writeUTF8StringBinary(String utf8) |
void |
writeVarInt(long x) |
public BinarySerializer(BuffedWriter writer, boolean enableCompress)
public void writeVarInt(long x)
throws IOException
IOExceptionpublic void writeByte(byte x)
throws IOException
IOExceptionpublic void writeBoolean(boolean x)
throws IOException
IOExceptionpublic void writeShort(short i)
throws IOException
IOExceptionpublic void writeInt(int i)
throws IOException
IOExceptionpublic void writeLong(long i)
throws IOException
IOExceptionpublic void writeUTF8StringBinary(String utf8) throws IOException
IOExceptionpublic void writeStringBinary(String data, Charset charset) throws IOException
IOExceptionpublic void writeBytesBinary(byte[] bs)
throws IOException
IOExceptionpublic void flushToTarget(boolean force)
throws IOException
IOExceptionpublic void maybeEnableCompressed()
public void maybeDisableCompressed()
throws IOException
IOExceptionpublic void writeFloat(float datum)
throws IOException
IOExceptionpublic void writeDouble(double datum)
throws IOException
IOExceptionpublic void writeBytes(byte[] bytes)
throws IOException
IOExceptionpublic void writeBytes(byte[] bytes,
int offset,
int length)
throws IOException
IOExceptionCopyright © 2021. All rights reserved.