// this will cause the input stream to be consumed and the memory archive being initialized.
Binary bin = session.getValueFactory().createBinary(pump);
if (pump.getError() != null) {
Exception error = pump.getError();
log.error("Error while reading from input stream.", error);
bin.dispose();
throw new IOException("Error while reading from input stream", error);
}
if (archive.getJcrRoot() == null) {
String msg = "Stream is not a content package. Missing 'jcr_root'.";