Skip to content

Commit 28e6e99

Browse files
author
huangyusong
committed
Feat: ClickHouseRowBinaryStream add writeBytes function
1 parent 7dee3b3 commit 28e6e99

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/util/ClickHouseRowBinaryStream.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ public void writeBytes(byte[] bytes) throws IOException {
6161
out.write(bytes);
6262
}
6363

64+
/**
65+
* @param bytes byte array will be written into stream
66+
* @param offset the starting offset in {@code bytes} to start writing at
67+
* @param len the length of the {@code bytes}, starting from {@code offset}
68+
* @throws IOException in case if an I/O error occurs
69+
*/
70+
public void writeBytes(byte[] bytes, int offset, int len) throws IOException {
71+
out.write(bytes, offset, len);
72+
}
73+
6474
/**
6575
* Dangerous. Can only be used for rare optimizations, for example when the string is written in parts
6676
* without prior concatenation. The size of the string in bytes must be passed through writeUnsignedLeb128.

0 commit comments

Comments
 (0)