private static CharsetDecoder getCharsetDecoder(final Charset charset) {
        final CharsetDecoder charsetDecoder = charset.newDecoder()
                .onMalformedInput(CodingErrorAction.REPLACE)
                .onUnmappableCharacter(CodingErrorAction.REPLACE)
                .replaceWith(DEFAULT_REPLACEMENT_STRING);
        return charsetDecoder;
    }
Produces a hex dump similar to the linux xxd binary.

@param inputStream     The stream to dump as hex
@param charset         The charset to decode single bytes with. Even if a multibyte charset
                       is supplied bytes will only be decoded individually.
@param maxHexDumpLines The max number of line of hex dump output. A full line contains 32 bytes.
@return
@throws IOException
stroom-util/src/main/java/stroom/util/string/HexDumpUtil.java