private void fillBuffer() throws IOException {
  if (!endOfInput && (lastCoderResult == null || lastCoderResult.isUnderflow())) {
    encoderIn.compact();
    int position=encoderIn.position();
    int c=reader.read(encoderIn.array(),position,encoderIn.remaining());
    if (c == -1) {
      endOfInput=true;
    }
 else {
      encoderIn.position(position + c);
    }
    encoderIn.flip();
  }
  encoderOut.compact();
  lastCoderResult=encoder.encode(encoderIn,encoderOut,endOfInput);
  encoderOut.flip();
}

private void fillBuffer ( ) throws IOException { if ( ! endOfInput && ( lastCoderResult == null || lastCoderResult . isUnderflow ( ) ) ) { encoderIn . compact ( ) ; int position = encoderIn . position ( ) ; int c = reader . read ( encoderIn . array ( ) , position , encoderIn . remaining ( ) ) ; if ( c == - 1 ) { endOfInput = true ; } else { encoderIn . position ( position + c ) ; } encoderIn . flip ( ) ; } encoderOut . compact ( ) ; lastCoderResult = encoder . encode ( encoderIn , encoderOut , endOfInput ) ; encoderOut . flip ( ) ; }
fills the internal char buffer from the reader .
