public static void fillBuffer(final InputStream stream, final byte[] buffer) throws IOException {
        fillBuffer(stream, buffer, 0, buffer.length);
    }
Read an exact number of bytes into a buffer. Throws an exception if the
number of bytes are not available.

@param stream to read from
@param buffer to read into
@throws IOException if error
stroom-util/src/main/java/stroom/util/io/StreamUtil.java