public static byte[] readByteArray(final DataInput in) throws IOException {
        int len = WritableUtils.readVInt(in);
        if (len < 0) {
            throw new NegativeArraySizeException(Integer.toString(len));
        }
        byte[] result = new byte[len];
        in.readFully(result, 0, len);
        return result;
    }
Read byte-array written with a WritableableUtils.vint prefix.

@param in Input to read from.
@return byte array read off <code>in</code>
@throws IOException e
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/Bytes.java