public byte[] getData() {
        if (buf.length > count) {
            byte[] data = new byte[count];
            System.arraycopy(buf, 0, data, 0, count);
            return data;
        } else {
            return buf;
        }
    }
Special constructor fo creating InputStream over not fully filled array

@param buf   byte array
@param count number of filled elements
clickhouse-data/src/main/java/com/clickhouse/data/format/tsv/FastByteArrayInputStream.java