public static void writeByteArray(final DataOutput out, final byte[] b) throws IOException {
        if (b == null) {
            WritableUtils.writeVInt(out, 0);
        } else {
            writeByteArray(out, b, 0, b.length);
        }
    }
Write byte-array with a WritableableUtils.vint prefix.

@param out output stream to be written to
@param b   array to write
@throws IOException e
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/Bytes.java