code: private void processInput(boolean endOfInput) throws IOException {
          // Prepare decoderIn for reading
          decoderIn.flip();
          CoderResult coderResult;
          while (true) {
              coderResult = decoder.decode(decoderIn, decoderOut, endOfInput);
              if (coderResult.isOverflow()) {
                  flushOutput();
              } else if (coderResult.isUnderflow()) {
                  break;
              } else {
                  // The decoder is configured to replace malformed input and unmappable characters,
                  // so we should not get here.
                  throw new IOException("Unexpected coder result");
              }
          }
          // Discard the bytes that have been read
          decoderIn.compact();
      }
docs: Decode the contents of the input ByteBuffer into a CharBuffer.
  
  @param endOfInput indicates end of input
  @throws IOException if an I/O error occurs