List of usage examples for java.util.zip InflaterOutputStream write
public void write(byte[] b, int off, int len) throws IOException
From source file:de.tntinteractive.portalsammler.engine.SecureStore.java
public byte[] getDocument(final DocumentInfo metadata) throws IOException { final Map<String, String> pointer = this.index.getFilePosition(metadata); final byte[] buffer = this.readAndDecrypt(pointer.get("f")); final int offset = Integer.parseInt(pointer.get("o")); final int size = Integer.parseInt(pointer.get("s")); final ByteArrayOutputStream result = new ByteArrayOutputStream(); final InflaterOutputStream inflate = new InflaterOutputStream(result); inflate.write(buffer, offset, size); inflate.close();/*from w w w . j av a 2 s.c o m*/ return result.toByteArray(); }