Top Fields Constructors Methods
org.apache.hc.core5.http.impl.io

public final Class EmptyInputStream

extends InputStream
Class Inheritance
Annotations
@Deprecated
Imports
java.io.InputStream

Deprecated

Please use org.apache.hc.core5.http.io.entity.EmptyInputStream

Since
4.4

Field Summary

Modifier and TypeField and Description
public static final EmptyInputStream
INSTANCE

Deprecated as a consequence of EmptyInputStream being deprecated.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
public void
public void
mark(final int
the maximum limit of bytes that can be read before the mark position becomes invalid.
readLimit
)

Overrides java.io.InputStream.mark.

Noop.
public boolean
public int
read()

Implements abstract java.io.InputStream.read.

Returns -1.
public int
read(final byte[]
the buffer into which the data is read.
buf
)

Overrides java.io.InputStream.read.

Returns -1.
public int
read(final byte[]
the buffer into which the data is read.
buf
,
final int
the start offset in array b at which the data is written.
off
,
final int
the maximum number of bytes to read.
len
)

Overrides java.io.InputStream.read.

Returns -1.
public void
reset()

Overrides java.io.InputStream.reset.

Noop.
public long
skip(final long
the number of bytes to be skipped.
n
)

Overrides java.io.InputStream.skip.

Returns 0.
Inherited from java.io.InputStream:
nullInputStreamreadAllBytesreadNBytesreadNBytesskipNBytestransferTo

Field Detail

INSTANCEback to summary
public static final EmptyInputStream INSTANCE

Deprecated

as a consequence of EmptyInputStream being deprecated. See corresponding docs for further information.

Constructor Detail

EmptyInputStreamback to summary
private EmptyInputStream()

Method Detail

availableback to summary
public int available()

Overrides java.io.InputStream.available.

Returns 0.

Returns:int

Doc from java.io.InputStream.available.

an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking or 0 when it reaches the end of the input stream.

Annotations
@Override
closeback to summary
public void close()

Overrides java.io.InputStream.close.

Implements java.io.Closeable.close.

Noop.

Annotations
@Override
markback to summary
public void mark(final int readLimit)

Overrides java.io.InputStream.mark.

Noop.

Parameters
readLimit:int

Doc from java.io.InputStream.mark.

the maximum limit of bytes that can be read before the mark position becomes invalid.

Annotations
@SuppressWarnings:sync-override
@Override
markSupportedback to summary
public boolean markSupported()

Overrides java.io.InputStream.markSupported.

Returns true.

Returns:boolean

Doc from java.io.InputStream.markSupported.

true if this stream instance supports the mark and reset methods; false otherwise.

Annotations
@Override
readback to summary
public int read()

Implements abstract java.io.InputStream.read.

Returns -1.

Returns:int

Doc from java.io.InputStream.read.

the next byte of data, or -1 if the end of the stream is reached.

Annotations
@Override
readback to summary
public int read(final byte[] buf)

Overrides java.io.InputStream.read.

Returns -1.

Parameters
buf:byte[]

Doc from java.io.InputStream.read.

the buffer into which the data is read.

Returns:int

Doc from java.io.InputStream.read.

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Annotations
@Override
readback to summary
public int read(final byte[] buf, final int off, final int len)

Overrides java.io.InputStream.read.

Returns -1.

Parameters
buf:byte[]

Doc from java.io.InputStream.read.

the buffer into which the data is read.

off:int

Doc from java.io.InputStream.read.

the start offset in array b at which the data is written.

len:int

Doc from java.io.InputStream.read.

the maximum number of bytes to read.

Returns:int

Doc from java.io.InputStream.read.

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Annotations
@Override
resetback to summary
public void reset()

Overrides java.io.InputStream.reset.

Noop.

Annotations
@SuppressWarnings:sync-override
@Override
skipback to summary
public long skip(final long n)

Overrides java.io.InputStream.skip.

Returns 0.

Parameters
n:long

Doc from java.io.InputStream.skip.

the number of bytes to be skipped.

Returns:long

Doc from java.io.InputStream.skip.

the actual number of bytes skipped which might be zero.

Annotations
@Override