mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8292327: java.io.EOFException in InflaterInputStream after JDK-8281962
Reviewed-by: alanb, lancea
This commit is contained in:
parent
e61f6fc394
commit
802ef38060
3 changed files with 93 additions and 1 deletions
|
@ -101,6 +101,7 @@ public class Inflater {
|
|||
private byte[] inputArray;
|
||||
private int inputPos, inputLim;
|
||||
private boolean finished;
|
||||
private boolean pendingOutput;
|
||||
private boolean needDict;
|
||||
private long bytesRead;
|
||||
private long bytesWritten;
|
||||
|
@ -415,6 +416,11 @@ public class Inflater {
|
|||
if ((result >>> 62 & 1) != 0) {
|
||||
finished = true;
|
||||
}
|
||||
if (written == len && !finished) {
|
||||
pendingOutput = true;
|
||||
} else {
|
||||
pendingOutput = false;
|
||||
}
|
||||
if ((result >>> 63 & 1) != 0) {
|
||||
needDict = true;
|
||||
}
|
||||
|
@ -711,6 +717,10 @@ public class Inflater {
|
|||
throw new NullPointerException("Inflater has been closed");
|
||||
}
|
||||
|
||||
boolean hasPendingOutput() {
|
||||
return pendingOutput;
|
||||
}
|
||||
|
||||
private static native void initIDs();
|
||||
private static native long init(boolean nowrap);
|
||||
private static native void setDictionary(long addr, byte[] b, int off,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue