org.apache.commons.io.input

Class ClosedInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable


    public class ClosedInputStreamextends InputStream
    Closed input stream. This stream returns EOF to all attempts to read something from the stream.

    Typically uses of this class include testing for corner cases in methods that accept input streams and acting as a sentinel value instead of a null input stream.

    Since:
    1.4
    Version:
    $Id: ClosedInputStream.java 1586350 2014-04-10 15:57:20Z ggregory $
    • Field Detail

      • CLOSED_INPUT_STREAM

        public static final ClosedInputStream CLOSED_INPUT_STREAM
        A singleton.
    • Constructor Detail

      • ClosedInputStream

        public ClosedInputStream()
    • Method Detail

      • read

        public int read()
        Returns -1 to indicate that the stream is closed.
        Specified by:
        read in class InputStream
        Returns:
        always -1

Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14