diff --git a/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/util/ClickHouseRowBinaryStream.java b/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/util/ClickHouseRowBinaryStream.java index 1f2be4e62..38908fe85 100644 --- a/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/util/ClickHouseRowBinaryStream.java +++ b/clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/util/ClickHouseRowBinaryStream.java @@ -61,6 +61,16 @@ public void writeBytes(byte[] bytes) throws IOException { out.write(bytes); } + /** + * @param bytes byte array will be written into stream + * @param offset the starting offset in {@code bytes} to start writing at + * @param len the length of the {@code bytes}, starting from {@code offset} + * @throws IOException in case if an I/O error occurs + */ + public void writeBytes(byte[] bytes, int offset, int len) throws IOException { + out.write(bytes, offset, len); + } + /** * Dangerous. Can only be used for rare optimizations, for example when the string is written in parts * without prior concatenation. The size of the string in bytes must be passed through writeUnsignedLeb128.