Skip to content

Commit d55add5

Browse files
committed
fix no sync input stream
1 parent 499a495 commit d55add5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/robaho/net/httpserver/NoSyncBufferedInputStream.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.io.OutputStream;
77

88
/**
9-
* simple buffered input stream with no synchronization. only supports mark readlimit up to the buffer size
9+
* simple buffered input stream with no synchronization. mark/reset are not supported.
1010
*/
1111
public class NoSyncBufferedInputStream extends FilterInputStream {
1212

@@ -76,14 +76,13 @@ public NoSyncBufferedInputStream(InputStream in) {
7676
}
7777

7878
/**
79-
* Fills the buffer with more data, taking into account
80-
* shuffling and other tricks for dealing with marks.
81-
* Assumes that it is being called by a locked method.
79+
* Fills the buffer with more data.
8280
* This method also assumes that all data has already been read in,
8381
* hence pos > count.
8482
*/
8583
private void fill() throws IOException {
8684
pos = 0;
85+
count = 0;
8786
int n = getInIfOpen().read(buf);
8887
if (n > 0)
8988
count = n;

0 commit comments

Comments
 (0)