From: <es...@us...> - 2010-06-01 17:04:33
|
Revision: 454 http://columba.svn.sourceforge.net/columba/?rev=454&view=rev Author: eschman Date: 2010-06-01 17:04:27 +0000 (Tue, 01 Jun 2010) Log Message: ----------- [bug] read should return the value in the range of 0 to 255 because of the negative return value at end of stream. This is the way ByteArrayInputStream does this Modified Paths: -------------- ristretto/trunk/ristretto-common/src/main/java/org/columba/ristretto/io/MemBufferInputStream.java Modified: ristretto/trunk/ristretto-common/src/main/java/org/columba/ristretto/io/MemBufferInputStream.java =================================================================== --- ristretto/trunk/ristretto-common/src/main/java/org/columba/ristretto/io/MemBufferInputStream.java 2010-05-31 20:56:58 UTC (rev 453) +++ ristretto/trunk/ristretto-common/src/main/java/org/columba/ristretto/io/MemBufferInputStream.java 2010-06-01 17:04:27 UTC (rev 454) @@ -63,7 +63,7 @@ */ public int read() throws IOException { if( buffer.size() == pos) return -1; - else return buffer.get(pos++); + else return buffer.get(pos++) & 0xff; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |