You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ia...@apache.org on 2004/03/05 06:19:27 UTC
cvs commit: ws-axis/java/src/org/apache/axis/transport/http NonBlockingBufferedInputStream.java
ias 2004/03/04 21:19:27
Modified: java/src/org/apache/axis/transport/http
NonBlockingBufferedInputStream.java
Log:
Bug fix - read() and peek() should return a value >=0 except EOF.
Note: UTF-16 uses FE FF or FF FE as Byte Order Mark and FF-> -1 as byte is not EOF.
Revision Changes Path
1.12 +2 -2 ws-axis/java/src/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java
Index: NonBlockingBufferedInputStream.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NonBlockingBufferedInputStream.java 25 Feb 2004 14:02:45 -0000 1.11
+++ NonBlockingBufferedInputStream.java 5 Mar 2004 05:19:27 -0000 1.12
@@ -85,7 +85,7 @@
if (in == null) return -1;
if (offset >= numbytes) refillBuffer();
if (offset >= numbytes) return -1;
- return buffer[offset++];
+ return buffer[offset++] & 0xFF;
}
/**
@@ -170,7 +170,7 @@
if (in == null) return -1;
if (offset >= numbytes) refillBuffer();
if (offset >= numbytes) return -1;
- return buffer[offset];
+ return buffer[offset] & 0xFF;
}
}