@Override public int read() throws IOException {
  for (; ; ) {
    if (encoderOut.hasRemaining()) {
      return encoderOut.get() & 0xFF;
    }
 else {
      fillBuffer();
      if (endOfInput && !encoderOut.hasRemaining()) {
        return -1;
      }
    }
  }
}

@ Override public int read ( ) throws IOException { for ( ; ; ) { if ( encoderOut . hasRemaining ( ) ) { return encoderOut . get ( ) & 0xFF ; } else { fillBuffer ( ) ; if ( endOfInput && ! encoderOut . hasRemaining ( ) ) { return - 1 ; } } } }
read a single byte .
