@Override public ByteBuffer compress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); DeflaterOutputStream ios = new DeflaterOutputStream(baos, getDeflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override public ByteBuffer decompress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); InflaterOutputStream ios = new InflaterOutputStream(baos, getInflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override public ByteBuffer compress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); DeflaterOutputStream ios = new DeflaterOutputStream(baos, getDeflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override ByteBuffer compress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); DeflaterOutputStream ios = new DeflaterOutputStream(baos, getDeflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override public ByteBuffer compress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); DeflaterOutputStream ios = new DeflaterOutputStream(baos, getDeflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override public ByteBuffer decompress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); InflaterOutputStream ios = new InflaterOutputStream(baos, getInflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override public ByteBuffer decompress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); InflaterOutputStream ios = new InflaterOutputStream(baos, getInflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }
@Override ByteBuffer decompress(ByteBuffer data) throws IOException { ByteArrayOutputStream baos = getOutputBuffer(data.remaining()); InflaterOutputStream ios = new InflaterOutputStream(baos, getInflater()); writeAndClose(data, ios); ByteBuffer result = ByteBuffer.wrap(baos.toByteArray()); return result; }