public class DataHandlerExtImpl extends javax.activation.DataHandler implements DataHandlerExt, java.util.Observer
| Modifier and Type | Field and Description |
|---|---|
private javax.activation.DataHandler |
dataHandler
Deprecated.
|
private boolean |
deleteOnreadOnce
Deprecated.
|
private static org.apache.commons.logging.Log |
log
Deprecated.
|
private LifecycleManager |
manager
Deprecated.
|
private static int |
READ_COUNT
Deprecated.
|
| Constructor and Description |
|---|
DataHandlerExtImpl(javax.activation.DataHandler dataHandler,
LifecycleManager manager)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteWhenReadOnce()
Deprecated.
|
private java.io.File |
getFile()
Deprecated.
|
void |
purgeDataSource()
Deprecated.
This method will give users an option to trigger a purge
on temporary attachment files.
|
java.io.InputStream |
readOnce()
Deprecated.
Get an
InputStream that consumes the content of this data handler. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Deprecated.
|
getAllCommands, getBean, getCommand, getContent, getContentType, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeToprivate static final org.apache.commons.logging.Log log
private javax.activation.DataHandler dataHandler
private LifecycleManager manager
private static int READ_COUNT
private boolean deleteOnreadOnce
public DataHandlerExtImpl(javax.activation.DataHandler dataHandler,
LifecycleManager manager)
public java.io.InputStream readOnce()
throws java.io.IOException
DataHandlerExtInputStream 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().
readOnce in interface DataHandlerExtnulljava.io.IOException - if an error occurspublic void deleteWhenReadOnce()
throws java.io.IOException
deleteWhenReadOnce in interface DataHandlerExtjava.io.IOExceptionpublic void purgeDataSource()
throws java.io.IOException
DataHandlerExtpurgeDataSource in interface DataHandlerExtjava.io.IOExceptionpublic void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerprivate java.io.File getFile()