Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected int getCompressedData() throws IOException {
while (n < len) {
int count = in.read(buffer, off + n, len - n);
if (count < 0) {
throw new EOFException("Unexpected end of block in input stream");
throw EOF_EXCEPTION;
}
n += count;
}
Expand All @@ -141,13 +141,15 @@ public void resetState() throws IOException {
super.resetState();
}

private static final EOFException EOF_EXCEPTION = new EOFException("EOF in BlockDecompressorStream");

private int rawReadInt() throws IOException {
int b1 = in.read();
int b2 = in.read();
int b3 = in.read();
int b4 = in.read();
if ((b1 | b2 | b3 | b4) < 0)
throw new EOFException();
throw EOF_EXCEPTION;
return ((b1 << 24) + (b2 << 16) + (b3 << 8) + (b4 << 0));
}
}
Loading