Example usage for com.google.common.io ByteProcessor getResult

List of usage examples for com.google.common.io ByteProcessor getResult

Introduction

In this page you can find the example usage for com.google.common.io ByteProcessor getResult.

Prototype

T getResult();

Source Link

Document

Return the result of processing all the bytes.

Usage

From source file:com.tinspx.util.io.ByteArrayChannelSource.java

@Override
public <T> T read(ByteProcessor<T> processor) throws IOException {
    final byte[] bytes = read();
    processor.processBytes(bytes, 0, bytes.length);
    return processor.getResult();
}

From source file:com.opengamma.strata.collect.io.ArrayByteSource.java

@Override
public <T> T read(ByteProcessor<T> processor) throws IOException {
    processor.processBytes(array, 0, array.length);
    return processor.getResult();
}

From source file:com.tinspx.util.io.ChannelSource.java

@Override
public <T> T read(ByteProcessor<T> processor) throws IOException {
    ByteUtils.copy(this, processor, Long.MAX_VALUE);
    return processor.getResult();
}