diff --git a/src.java/crosby/binary/file/BlockInputStream.java b/src.java/crosby/binary/file/BlockInputStream.java index 7274a1e..1266e5e 100644 --- a/src.java/crosby/binary/file/BlockInputStream.java +++ b/src.java/crosby/binary/file/BlockInputStream.java @@ -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 {