/[classpath]/gjdoc/src/gnu/classpath/tools/NotifyingInputStreamReader.java
ViewVC logotype

Diff of /gjdoc/src/gnu/classpath/tools/NotifyingInputStreamReader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by julian, Wed Dec 15 16:10:06 2004 UTC revision 1.3 by julian, Fri Feb 11 16:07:50 2005 UTC
# Line 274  public class NotifyingInputStreamReader Line 274  public class NotifyingInputStreamReader
274           }           }
275           else if (coderResult.isUnderflow()) {           else if (coderResult.isUnderflow()) {
276              if (!allInputConsumed) {              if (!allInputConsumed) {
277                   int nRemainingBytes
278                      = Math.max(0, byteBuffer.limit() - byteBuffer.position());
279                   if (nRemainingBytes > 0) {
280                      byteBuffer.get(readBuffer, 0, nRemainingBytes);
281                   }
282                 byteBuffer.rewind();                 byteBuffer.rewind();
283                 int nread = in.read(readBuffer);                 int nread = in.read(readBuffer, nRemainingBytes,
284                                       readBuffer.length - nRemainingBytes);
285                 if (nread < 0) {                 if (nread < 0) {
286                    allInputConsumed = true;                    allInputConsumed = true;
287                 }                 }
288                 byteBuffer.limit(Math.max(0, nread));                 byteBuffer.limit(nRemainingBytes + Math.max(0, nread));
289              }              }
290              else {              else {
291                 break;                 break;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26