DelegatingInputStream (Apache CXF JavaDoc 3.6.11 API)

Package org.apache.cxf.io

## Class DelegatingInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - org.apache.cxf.io.DelegatingInputStream

- All Implemented Interfaces:
    `Closeable`, `AutoCloseable`

      public class DelegatingInputStream
      extends FilterInputStream

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `cached` |

    - ### Fields inherited from class java.io.FilterInputStream

      `in`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DelegatingInputStream​(InputStream is)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `cacheInput()` | Read the entire original input stream and cache it.
    `InputStream` | `getInputStream()` |
    `void` | `setInputStream​(InputStream inputStream)` |

    - ### Methods inherited from class java.io.FilterInputStream

      `available, close, mark, markSupported, read, read, read, reset, skip`

    - ### Methods inherited from class java.io.InputStream

      `nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo`

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

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

- - ### Field Detail

    - #### cached

          protected boolean cached

  - ### Constructor Detail

    - #### DelegatingInputStream

          public DelegatingInputStream​(InputStream is)

  - ### Method Detail

    - #### setInputStream

          public void setInputStream​(InputStream inputStream)

    - #### getInputStream

          public InputStream getInputStream()

    - #### cacheInput

          public void cacheInput()

      Read the entire original input stream and cache it. Useful if switching threads or doing something where the original stream may not be valid by the time the next read() occurs