if (inf.finished()) {
return -1;
} else if (inf.needsDictionary()) {
gzipEntry.diagnostics.addError(new Diagnosis(DiagnosisType.INVALID_DATA, "GZip file", "Unexpected EOF!"));
bIsCompliant = false;
throw new DataFormatException("Dictionary needed!");
} else if (inf.needsInput()) {
lastInput = pbin.read(inputBytes, 0, inputBytes.length);
if (lastInput == -1) {
gzipEntry.diagnostics.addError(new Diagnosis(DiagnosisType.INVALID_DATA, "GZip file", "Unexpected EOF!"));
bIsCompliant = false;
throw new DataFormatException("Data missing!");
}
inf.setInput(inputBytes, 0, lastInput);
} else {
gzipEntry.diagnostics.addError(new Diagnosis(DiagnosisType.INVALID_DATA, "GZip file", "Unexpected EOF!"));
bIsCompliant = false;
throw new DataFormatException("Inflater malfunction!");
}
}
return inflated;
}