Example usage for org.bouncycastle.cms.jcajce ZlibExpanderProvider ZlibExpanderProvider

List of usage examples for org.bouncycastle.cms.jcajce ZlibExpanderProvider ZlibExpanderProvider

Introduction

In this page you can find the example usage for org.bouncycastle.cms.jcajce ZlibExpanderProvider ZlibExpanderProvider.

Prototype

public ZlibExpanderProvider(long limit) 

Source Link

Document

Create a provider which caps the number of expanded bytes that can be produced when the compressed stream is parsed.

Usage

From source file:mitm.common.security.cms.CMSCompressedDataAdapterImpl.java

License:Open Source License

@Override
public byte[] getContent() throws CMSException {
    return compressedData.getContent(new ZlibExpanderProvider(limit));
}

From source file:mitm.common.security.cms.CMSCompressedDataParserAdapterImpl.java

License:Open Source License

@Override
public InputStream getContentStream() throws CMSException {
    return compressedData.getContent(new ZlibExpanderProvider(limit)).getContentStream();
}