org.apache.synapse.transport.passthru.util

## Class StreamingOnRequestDataSource

- java.lang.Object
- - org.apache.synapse.transport.passthru.util.StreamingOnRequestDataSource

- All Implemented Interfaces:
    javax.activation.DataSource

      public class StreamingOnRequestDataSource
      extends java.lang.Object
      implements javax.activation.DataSource

  This class has a special flag, which says this is it's last use and not to cache data if it did not have done so already.
  Author:
    Srinath Perera (srinath@wso2.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamingOnRequestDataSource(java.io.InputStream in)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getContentType()`
    `java.io.InputStream` | `getInputStream()`
    `java.lang.String` | `getName()`
    `java.io.OutputStream` | `getOutputStream()`
    `void` | `setLastUse(boolean lastUse)` This flag says that this is the last use of the stream, hence do not need to cache it if it has not already cached.

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

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

- - ### Constructor Detail

    - #### StreamingOnRequestDataSource

          public StreamingOnRequestDataSource(java.io.InputStream in)

  - ### Method Detail

    - #### getContentType

          public java.lang.String getContentType()

      Specified by:
        `getContentType` in interface `javax.activation.DataSource`

    - #### getInputStream

          public java.io.InputStream getInputStream()
                                             throws java.io.IOException

      Specified by:
        `getInputStream` in interface `javax.activation.DataSource`
      Throws:
        `java.io.IOException`

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `javax.activation.DataSource`

    - #### getOutputStream

          public java.io.OutputStream getOutputStream()
                                               throws java.io.IOException

      Specified by:
        `getOutputStream` in interface `javax.activation.DataSource`
      Throws:
        `java.io.IOException`

    - #### setLastUse

          public void setLastUse(boolean lastUse)

      This flag says that this is the last use of the stream, hence do not need to cache it if it has not already cached.
      Parameters:
        `lastUse` -

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.