public static String readStringFixedSize(final DataInput in, int size) throws IOException {
        byte[] b = new byte[size];
        in.readFully(b);
        int n = b.length;
        while (n > 0 && b[n - 1] == 0) {
            --n;
        }

        return toString(b, 0, n);
    }
Reads a fixed-size field and interprets it as a string padded with zeros.
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/Bytes.java