List of usage examples for java.util.zip InflaterOutputStream write
public void write(int b) throws IOException
From source file:de.siegmar.logbackgelf.GelfUdpAppenderTest.java
private JsonNode receiveCompressedMessage() throws IOException { final ByteArrayOutputStream bos = new ByteArrayOutputStream(); final InflaterOutputStream inflaterOutputStream = new InflaterOutputStream(bos); inflaterOutputStream.write(server.getReceivedData()); inflaterOutputStream.close();/* w ww . j av a2 s. co m*/ return new ObjectMapper().readTree(bos.toByteArray()); }
From source file:org.xlcloud.console.saml2.Saml2ServiceProviderConsumerServlet.java
private byte[] inflate(byte[] responseBytes) throws IOException { Inflater inflater = new Inflater(true); ByteArrayOutputStream out = new ByteArrayOutputStream(); InflaterOutputStream ios = new InflaterOutputStream(out, inflater); ios.write(responseBytes); ios.close();/*from ww w . j a v a2 s . c om*/ return out.toByteArray(); }