/** * Read a single byte. * * @return either the byte read or <code>-1</code> if the end of the stream * has been reached * @throws java.io.IOException if an I/O error occurs */ @Override public int read() throws IOException { for (; ; ) { if (encoderOut.hasRemaining()) { return encoderOut.get() & 0xFF; } else { fillBuffer(); if (endOfInput && !encoderOut.hasRemaining()) { return -1; } } } }
read += c; } else { fillBuffer(); if (endOfInput && !encoderOut.hasRemaining()) { break;