Get rid of the input.available call.

This commit is contained in:
Scott Crosby 2011-01-10 22:22:00 -06:00
parent fdb5facaff
commit 87d7de3090
1 changed files with 6 additions and 2 deletions

View File

@ -17,6 +17,7 @@
package crosby.binary.file;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
@ -28,10 +29,13 @@ public class BlockInputStream {
}
public void process() throws IOException {
while (input.available() > 0) {
FileBlock.process(input, adaptor);
try {
while (true) {
FileBlock.process(input, adaptor);
}
} catch (EOFException e) {
adaptor.complete();
}
}
public void close() throws IOException {