projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
745fb6a
)
2003/10/16 05:46:24
author
brian
<brian@xwt.org>
Fri, 30 Jan 2004 07:39:24 +0000
(07:39 +0000)
committer
brian
<brian@xwt.org>
Fri, 30 Jan 2004 07:39:24 +0000
(07:39 +0000)
darcs-hash:
20040130073924
-aa32f-
7eb779c2b50870239dd1caeaaa2da46dcd0e3f4f
.gz
src/org/xwt/util/CachedInputStream.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/util/CachedInputStream.java
b/src/org/xwt/util/CachedInputStream.java
index
1c2cffd
..
fdf8a78
100644
(file)
--- a/
src/org/xwt/util/CachedInputStream.java
+++ b/
src/org/xwt/util/CachedInputStream.java
@@
-41,7
+41,7
@@
public class CachedInputStream {
public int read() throws IOException { // FEATURE: be smarter here
byte[] b = new byte[1];
int ret = read(b, 0, 1);
public int read() throws IOException { // FEATURE: be smarter here
byte[] b = new byte[1];
int ret = read(b, 0, 1);
- return ret == -1 ? -1 : b[0];
+ return ret == -1 ? -1 : b[0]&0xff;
}
public int read(byte[] b, int off, int len) throws IOException {
synchronized(CachedInputStream.this) {
}
public int read(byte[] b, int off, int len) throws IOException {
synchronized(CachedInputStream.this) {
@@
-49,6
+49,7
@@
public class CachedInputStream {
if (eof && pos == size) return -1;
int count = Math.min(size - pos, len);
System.arraycopy(cache, pos, b, off, count);
if (eof && pos == size) return -1;
int count = Math.min(size - pos, len);
System.arraycopy(cache, pos, b, off, count);
+ pos += count;
return count;
}
}
return count;
}
}