public interface Encoder
| Modifier and Type | Method and Description |
|---|---|
Encoder |
writeBool(boolean b)
Writes out a boolean value.
|
Encoder |
writeBytes(byte[] bytes)
Writes out a byte array.
|
Encoder |
writeBytes(byte[] bytes,
int off,
int len)
Writes out a byte array.
|
Encoder |
writeBytes(ByteBuffer bytes)
Writes out the remaining bytes in
ByteBuffer. |
Encoder |
writeDouble(double d)
Writes out a double value.
|
Encoder |
writeFloat(float f)
Writes out a float value.
|
Encoder |
writeInt(int i)
Writes out a int value.
|
Encoder |
writeLong(long l)
Writes out a long value.
|
Encoder |
writeNull()
Writes out a null value.
|
Encoder |
writeString(String s)
Writes out a string value.
|
Encoder writeNull() throws IOException
IOException - if failed to encodeEncoder writeBool(boolean b) throws IOException
b - the value to writeIOException - if failed to encodeEncoder writeInt(int i) throws IOException
i - the value to writeIOException - if failed to encodeEncoder writeLong(long l) throws IOException
l - the value to writeIOException - if failed to encodeEncoder writeFloat(float f) throws IOException
f - the value to writeIOException - if failed to encodeEncoder writeDouble(double d) throws IOException
d - the value to writeIOException - if failed to encodeEncoder writeString(String s) throws IOException
s - the value to writeIOException - if failed to encodeEncoder writeBytes(byte[] bytes) throws IOException
bytes - the value to writeIOException - if failed to encodeEncoder writeBytes(byte[] bytes, int off, int len) throws IOException
bytes - the value to writeoff - the starting offset in the byte array to writelen - number of bytes to write, starting from the given offsetIOException - if failed to encodeEncoder writeBytes(ByteBuffer bytes) throws IOException
ByteBuffer.
The given ByteBuffer is untounch after this method is returned (i.e. same position and limit).bytes - bytes to writeIOException - if failed to encodeCopyright © 2018 Cask Data, Inc. Licensed under the Apache License, Version 2.0.