org.apache.hc.core5.http.impl.io

## Class EmptyInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.hc.core5.http.impl.io.EmptyInputStream

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public final class EmptyInputStream
      extends InputStream

  Since:
    4.4

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static EmptyInputStream` | `INSTANCE`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `available()` Returns `0`.
    `void` | `close()` Noop.
    `void` | `mark(int readLimit)` Noop.
    `boolean` | `markSupported()` Returns `true`.
    `int` | `read()` Returns `-1`.
    `int` | `read(byte[] buf)` Returns `-1`.
    `int` | `read(byte[] buf, int off, int len)` Returns `-1`.
    `void` | `reset()` Noop.
    `long` | `skip(long n)` Returns `0`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final EmptyInputStream INSTANCE

  - ### Method Detail

    - #### available

          public int available()

      Returns `0`.
      Overrides:
        `available` in class `InputStream`

    - #### close

          public void close()

      Noop.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `InputStream`

    - #### mark

          public void mark(int readLimit)

      Noop.
      Overrides:
        `mark` in class `InputStream`

    - #### markSupported

          public boolean markSupported()

      Returns `true`.
      Overrides:
        `markSupported` in class `InputStream`

    - #### read

          public int read()

      Returns `-1`.
      Specified by:
        `read` in class `InputStream`

    - #### read

          public int read(byte[] buf)

      Returns `-1`.
      Overrides:
        `read` in class `InputStream`

    - #### read

          public int read(byte[] buf,
                 int off,
                 int len)

      Returns `-1`.
      Overrides:
        `read` in class `InputStream`

    - #### reset

          public void reset()

      Noop.
      Overrides:
        `reset` in class `InputStream`

    - #### skip

          public long skip(long n)

      Returns `0`.
      Overrides:
        `skip` in class `InputStream`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.