Example usage for java.util.zip InflaterOutputStream InflaterOutputStream

List of usage examples for java.util.zip InflaterOutputStream InflaterOutputStream

Introduction

In this page you can find the example usage for java.util.zip InflaterOutputStream InflaterOutputStream.

Prototype

public InflaterOutputStream(OutputStream out, Inflater infl) 

Source Link

Document

Creates a new output stream with the specified decompressor and a default buffer size.

Usage

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);//from   ww w.ja v a 2 s. c o  m
    ios.close();
    return out.toByteArray();
}