* Streaming: Fix bug causing read() to incorrectly return EOF

This commit is contained in:
zzz
2010-11-17 14:26:24 +00:00
parent f3307d6508
commit e68a3fb856

View File

@ -258,8 +258,7 @@ public class MessageInputStream extends InputStream {
int read = read(_oneByte, 0, 1); int read = read(_oneByte, 0, 1);
if (read < 0) if (read < 0)
return -1; return -1;
else return _oneByte[0] & 0xff;
return _oneByte[0];
} }
@Override @Override
@ -359,7 +358,7 @@ public class MessageInputStream extends InputStream {
} // synchronized (_dataLock) } // synchronized (_dataLock)
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("read(...," + offset+", " + length+ ") read fully total read: " +_readTotal); _log.debug("read(byte[]," + offset + ',' + length + ") read fully; total read: " +_readTotal);
return length; return length;
} }