Example usage for com.google.common.io CountingInputStream reset

List of usage examples for com.google.common.io CountingInputStream reset

Introduction

In this page you can find the example usage for com.google.common.io CountingInputStream reset.

Prototype

@Override
    public synchronized void reset() throws IOException 

Source Link

Usage

From source file:org.echocat.marquardt.common.Validator.java

private byte[] readSignableBytesAgainForLaterValidation(final CountingInputStream bufferedInputStream)
        throws IOException {
    final int position = (int) bufferedInputStream.getCount();
    bufferedInputStream.reset();
    final byte[] bytes = new byte[position];
    IOUtils.read(bufferedInputStream, bytes, 0, position);
    return bytes;
}