Package org.simpleframework.http.message
Class EmptyInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.simpleframework.http.message.EmptyInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class EmptyInputStream extends java.io.InputStream
TheEmptyInputStream
object provides a stream that is immediately empty. Each read method with this input stream will return a -1 value indicating that the stream has come to an end and no more data can be read from it.
-
-
Constructor Summary
Constructors Constructor Description EmptyInputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read()
This is used to provide a -1 value when an attempt is made to read from the stream.
-
-
-
Method Detail
-
read
public int read()
This is used to provide a -1 value when an attempt is made to read from the stream. Implementing this method as so also ensures that all the other read methods return a -1 value.- Specified by:
read
in classjava.io.InputStream
- Returns:
- this returns a -1 when an attempt is made to read
-
-