ByteArrayOutputStream stream = new ByteArrayOutputStream();
Deflater deflater = new Deflater(compressionLevel);
DeflaterOutputStream zip = new DeflaterOutputStream(stream, deflater);
zip.write(data);
zip.close();
deflater.end();
bytes = stream.toByteArray();
this.compressionLevel = compressionLevel;
}
catch (IOException ioe) {
throw new ExceptionConverter(ioe);