public Optional<DecodedChar> read() throws IOException {

        final DecodedChar decodedChar = byteStreamDecoder.decodeNextChar();

        if (decodedChar == null) {
            return Optional.empty();
        } else {
            currCharOffset++;
            if (lastCharDecoded != null) {
                currByteOffset += lastCharDecoded.getByteCount();
            } else {
                currByteOffset = 0;
            }
            LOGGER.trace("Read [{}], currByteOffset: {}, currCharOffset {}",
                    decodedChar, currByteOffset, currCharOffset);
            lastCharDecoded = decodedChar;
            return Optional.of(decodedChar);
        }
    }
@param inputStream          The stream to read from. This reader will not close the stream.
@param includeByteOrderMark If true, any BOM in the stream will be included.
@param encoding             The character encoding name of the stream.
stroom-data/stroom-data-store-impl/src/main/java/stroom/data/store/impl/CharReader.java