Package org.apache.axis2.util
Class WrappedDataHandler
java.lang.Object
javax.activation.DataHandler
org.apache.axis2.util.WrappedDataHandler
- All Implemented Interfaces:
Transferable
This class acts as a wrapper for the javax.activation.DataHandler class.
It is used to store away a (potentially) user-defined content-type value along with
the DataHandler instance. We'll delegate all method calls except for getContentType()
to the real DataHandler instance.
-
Constructor Summary
ConstructorsConstructorDescriptionWrappedDataHandler(DataHandler _delegate, String _contentType) Constructs a new instance of the WrappedDataHandler. -
Method Summary
Modifier and TypeMethodDescriptiongetBean(CommandInfo paramCommandInfo) getCommand(String paramString) getName()getTransferData(DataFlavor paramDataFlavor) booleanisDataFlavorSupported(DataFlavor paramDataFlavor) voidsetCommandMap(CommandMap paramCommandMap) voidwriteTo(OutputStream paramOutputStream) Methods inherited from class javax.activation.DataHandler
setDataContentHandlerFactory
-
Constructor Details
-
WrappedDataHandler
Constructs a new instance of the WrappedDataHandler.- Parameters:
_delegate- the real DataHandler instance being wrapped_contentType- the user-defined contentType associated with the DataHandler instance
-
-
Method Details
-
getAllCommands
- Overrides:
getAllCommandsin classDataHandler
-
getBean
- Overrides:
getBeanin classDataHandler
-
getCommand
- Overrides:
getCommandin classDataHandler
-
getContent
- Overrides:
getContentin classDataHandler- Throws:
IOException
-
getContentType
- Overrides:
getContentTypein classDataHandler
-
getDataSource
- Overrides:
getDataSourcein classDataHandler
-
getInputStream
- Overrides:
getInputStreamin classDataHandler- Throws:
IOException
-
getName
- Overrides:
getNamein classDataHandler
-
getOutputStream
- Overrides:
getOutputStreamin classDataHandler- Throws:
IOException
-
getPreferredCommands
- Overrides:
getPreferredCommandsin classDataHandler
-
getTransferData
public Object getTransferData(DataFlavor paramDataFlavor) throws UnsupportedFlavorException, IOException - Specified by:
getTransferDatain interfaceTransferable- Overrides:
getTransferDatain classDataHandler- Throws:
UnsupportedFlavorExceptionIOException
-
getTransferDataFlavors
- Specified by:
getTransferDataFlavorsin interfaceTransferable- Overrides:
getTransferDataFlavorsin classDataHandler
-
isDataFlavorSupported
- Specified by:
isDataFlavorSupportedin interfaceTransferable- Overrides:
isDataFlavorSupportedin classDataHandler
-
setCommandMap
- Overrides:
setCommandMapin classDataHandler
-
writeTo
- Overrides:
writeToin classDataHandler- Throws:
IOException
-