public class ClickHouseRowBinaryStream extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static long |
MILLIS_IN_DAY |
| Constructor and Description |
|---|
ClickHouseRowBinaryStream(OutputStream outputStream,
TimeZone timeZone,
ClickHouseProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
markNextNullable(boolean isNullable)
Write a marker indicating if value is nullable or not.
|
void |
writeByte(byte b)
Dangerous.
|
void |
writeBytes(byte[] bytes)
Dangerous.
|
void |
writeDate(Date date) |
void |
writeDateArray(Date[] dates) |
void |
writeDateTime(Date date) |
void |
writeDateTimeArray(Date[] dates) |
void |
writeDecimal128(BigDecimal num,
int scale) |
void |
writeDecimal32(BigDecimal num,
int scale) |
void |
writeDecimal64(BigDecimal num,
int scale) |
void |
writeFloat32(float value) |
void |
writeFloat32Array(float[] floats) |
void |
writeFloat64(double value) |
void |
writeFloat64Array(double[] doubles) |
void |
writeInt16(int value) |
void |
writeInt16(short value) |
void |
writeInt16Array(short[] shorts) |
void |
writeInt32(int value) |
void |
writeInt32Array(int[] ints) |
void |
writeInt64(long value) |
void |
writeInt64Array(long[] longs) |
void |
writeInt8(byte value) |
void |
writeInt8(int value) |
void |
writeInt8Array(byte[] bytes) |
void |
writeInt8Array(int[] ints) |
void |
writeString(String string) |
void |
writeStringArray(String[] strings) |
void |
writeUInt16(int value) |
void |
writeUInt16Array(int[] ints) |
void |
writeUInt32(long value) |
void |
writeUInt32Array(long[] longs) |
void |
writeUInt64(long value) |
void |
writeUInt64(com.google.common.primitives.UnsignedLong value) |
void |
writeUInt64Array(long[] longs) |
void |
writeUInt8(boolean value) |
void |
writeUInt8(int value) |
void |
writeUInt8Array(int[] ints) |
void |
writeUnsignedLeb128(int value) |
void |
writeUUID(UUID uuid) |
public ClickHouseRowBinaryStream(OutputStream outputStream, TimeZone timeZone, ClickHouseProperties properties)
public void writeUnsignedLeb128(int value)
throws IOException
IOExceptionpublic void writeBytes(byte[] bytes)
throws IOException
bytes - byte array will be written into streamIOException - in case if an I/O error occurspublic void writeByte(byte b)
throws IOException
b - byte valueIOException - in case if an I/O error occurspublic void writeString(String string) throws IOException
IOExceptionpublic void writeUInt8(boolean value)
throws IOException
IOExceptionpublic void writeUInt8(int value)
throws IOException
IOExceptionpublic void writeInt8(int value)
throws IOException
IOExceptionpublic void writeInt8(byte value)
throws IOException
IOExceptionpublic void writeInt16(int value)
throws IOException
IOExceptionpublic void writeInt16(short value)
throws IOException
IOExceptionpublic void writeUInt16(int value)
throws IOException
IOExceptionpublic void writeInt32(int value)
throws IOException
IOExceptionpublic void writeUInt32(long value)
throws IOException
IOExceptionpublic void writeInt64(long value)
throws IOException
IOExceptionpublic void writeUInt64(long value)
throws IOException
IOExceptionpublic void writeUInt64(com.google.common.primitives.UnsignedLong value)
throws IOException
IOExceptionpublic void writeDateTime(Date date) throws IOException
IOExceptionpublic void writeDate(Date date) throws IOException
IOExceptionpublic void writeFloat32(float value)
throws IOException
IOExceptionpublic void writeFloat64(double value)
throws IOException
IOExceptionpublic void writeDecimal128(BigDecimal num, int scale) throws IOException
IOExceptionpublic void writeDecimal64(BigDecimal num, int scale) throws IOException
IOExceptionpublic void writeDecimal32(BigDecimal num, int scale) throws IOException
IOExceptionpublic void writeDateArray(Date[] dates) throws IOException
IOExceptionpublic void writeDateTimeArray(Date[] dates) throws IOException
IOExceptionpublic void writeStringArray(String[] strings) throws IOException
IOExceptionpublic void writeInt8Array(byte[] bytes)
throws IOException
IOExceptionpublic void writeInt8Array(int[] ints)
throws IOException
IOExceptionpublic void writeUInt8Array(int[] ints)
throws IOException
IOExceptionpublic void writeInt16Array(short[] shorts)
throws IOException
IOExceptionpublic void writeUInt16Array(int[] ints)
throws IOException
IOExceptionpublic void writeInt32Array(int[] ints)
throws IOException
IOExceptionpublic void writeUInt32Array(long[] longs)
throws IOException
IOExceptionpublic void writeInt64Array(long[] longs)
throws IOException
IOExceptionpublic void writeUInt64Array(long[] longs)
throws IOException
IOExceptionpublic void writeFloat32Array(float[] floats)
throws IOException
IOExceptionpublic void writeFloat64Array(double[] doubles)
throws IOException
IOExceptionpublic void markNextNullable(boolean isNullable)
throws IOException
E.g., to write Nullable(Int32):
void writeNullableInt32(Integer value) {
if (value == null) {
markNextNullable(true);
} else {
markNextNullable(false);
writeInt32(value);
}
}
isNullable - if it's true, 1 will be written otherwise 0IOException - in case if an I/O error occurspublic void writeUUID(UUID uuid) throws IOException
IOExceptionCopyright © 2020. All rights reserved.