Class EmptyInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.hc.core5.http.io.entity.EmptyInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public final class EmptyInputStream extends java.io.InputStream- Since:
- 5.1
-
-
Field Summary
Fields Modifier and Type Field Description static EmptyInputStreamINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateEmptyInputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()Returns0.voidclose()Noop.voidmark(int readLimit)Noop.booleanmarkSupported()Returnstrue.intread()Returns-1.intread(byte[] buf)Returns-1.intread(byte[] buf, int off, int len)Returns-1.voidreset()Noop.longskip(long n)Returns0.
-
-
-
Field Detail
-
INSTANCE
public static final EmptyInputStream INSTANCE
-
-
Method Detail
-
available
public int available()
Returns0.- Overrides:
availablein classjava.io.InputStream
-
close
public void close()
Noop.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream
-
mark
public void mark(int readLimit)
Noop.- Overrides:
markin classjava.io.InputStream
-
markSupported
public boolean markSupported()
Returnstrue.- Overrides:
markSupportedin classjava.io.InputStream
-
read
public int read()
Returns-1.- Specified by:
readin classjava.io.InputStream
-
read
public int read(byte[] buf)
Returns-1.- Overrides:
readin classjava.io.InputStream
-
read
public int read(byte[] buf, int off, int len)Returns-1.- Overrides:
readin classjava.io.InputStream
-
reset
public void reset()
Noop.- Overrides:
resetin classjava.io.InputStream
-
skip
public long skip(long n)
Returns0.- Overrides:
skipin classjava.io.InputStream
-
-