- All Implemented Interfaces:
public class ClosedInputStream
- extends InputStream
Closed input stream. This stream returns -1 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.
- $Id: ClosedInputStream.java 1307459 2012-03-30 15:11:44Z ggregory $
Returns -1 to indicate that the stream is closed.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final ClosedInputStream CLOSED_INPUT_STREAM
- A singleton.
public int read()
- Returns -1 to indicate that the stream is closed.
- Specified by:
read in class
- always -1
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.