Example usage for org.apache.commons.io.input NullInputStream read

List of usage examples for org.apache.commons.io.input NullInputStream read

Introduction

In this page you can find the example usage for org.apache.commons.io.input NullInputStream read.

Prototype

public int read() throws IOException 

Source Link

Document

Read a byte.

Usage

From source file:ch.cyberduck.core.io.DisabledChecksumComputeTest.java

@Test(expected = IOException.class)
public void compute() throws Exception {
    final NullInputStream in = new NullInputStream(0L);
    new DisabledChecksumCompute().compute(in, new TransferStatus());
    assertEquals(-1, in.read());
    in.read();//from w  w  w  . ja  v a 2  s. c  om
}