org.apache.axiom.attachments.lifecycle.impl

## Class DataHandlerExtImpl

- java.lang.Object
- - javax.activation.DataHandler
  - - org.apache.axiom.attachments.lifecycle.impl.DataHandlerExtImpl

- All Implemented Interfaces:
    Transferable, Observer, DataHandlerExt

  Deprecated.
  This class is no longer used in Axiom 1.2.13 and will be removed in Axiom 1.3.

      public class DataHandlerExtImpl
      extends javax.activation.DataHandler
      implements DataHandlerExt, Observer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataHandlerExtImpl(javax.activation.DataHandler dataHandler, LifecycleManager manager)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deleteWhenReadOnce()` Deprecated.
    `void` | `purgeDataSource()` Deprecated. This method will give users an option to trigger a purge on temporary attachment files.
    `InputStream` | `readOnce()` Deprecated. Get an `InputStream` that consumes the content of this data handler.
    `void` | `update(Observable o, Object arg)` Deprecated.

    - ### Methods inherited from class javax.activation.DataHandler

      `getAllCommands, getBean, getCommand, getContent, getContentType, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeTo`

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

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

- - ### Constructor Detail

    - #### DataHandlerExtImpl

          public DataHandlerExtImpl(javax.activation.DataHandler dataHandler,
                                    LifecycleManager manager)

      Deprecated.

  - ### Method Detail

    - #### readOnce

          public InputStream readOnce()
                               throws IOException

      Deprecated.
      Description copied from interface: `DataHandlerExt`
      Get an `InputStream` that consumes the content of this data handler. This method is similar to `DataHandler.getInputStream()` except that it can be invoked only once. If the content has not been buffered yet, then the implementation may choose to enable streaming of the content.

      The implementation ensures that after the returned input steam is consumed, the data handler will be in the same state as after a call to `DataHandlerExt.purgeDataSource()`.

      Specified by:
        `readOnce` in interface `DataHandlerExt`
      Returns:
        the stream representing the content; never `null`
      Throws:
        `IOException` - if an error occurs

    - #### deleteWhenReadOnce

          public void deleteWhenReadOnce()
                                  throws IOException

      Deprecated.
      Specified by:
        `deleteWhenReadOnce` in interface `DataHandlerExt`
      Throws:
        `IOException`

    - #### purgeDataSource

          public void purgeDataSource()
                               throws IOException

      Deprecated.
      Description copied from interface: `DataHandlerExt`
      This method will give users an option to trigger a purge on temporary attachment files. Temp files are created for attachment data that is greater than a threshold limit. On client side These temp attachment files are not deleted untilthe virtual machine exits as user can choose to read this dataHandler. So if user is not going to use the data handlers provided on this temproray files they can choose to purge the file.
      Specified by:
        `purgeDataSource` in interface `DataHandlerExt`
      Throws:
        `IOException`

    - #### update

          public void update(Observable o,
                             Object arg)

      Deprecated.
      Specified by:
        `update` in interface `Observer`

Copyright © The Apache Software Foundation. All Rights Reserved.