Example usage for org.bouncycastle.util.io Streams readAllLimited

List of usage examples for org.bouncycastle.util.io Streams readAllLimited

Introduction

In this page you can find the example usage for org.bouncycastle.util.io Streams readAllLimited.

Prototype

public static byte[] readAllLimited(InputStream inStr, int limit) throws IOException 

Source Link

Document

Read from inStr up to a maximum number of bytes, throwing an exception if more the maximum amount of requested data is available.

Usage

From source file:org.votingsystem.signature.util.CMSUtils.java

License:Open Source License

public static byte[] streamToByteArray(InputStream in, int limit) throws IOException {
    return Streams.readAllLimited(in, limit);
}