Package org.apache.axiom.util.activation
Class DataHandlerUtils
java.lang.Object
org.apache.axiom.util.activation.DataHandlerUtils
Contains utility methods to work with
DataHandler objects.-
Method Summary
Modifier and TypeMethodDescriptionstatic DataHandlergetDataHandler(Blob blob) Get theDataHandlerwrapped by the givenBlob.static BlobtoBlob(DataHandler dh) Get aBlobfor the givenDataHandler.static DataHandlertoDataHandler(Blob blob) Get aDataHandlerfor the givenBlob.
-
Method Details
-
getDataHandler
Get theDataHandlerwrapped by the givenBlob.- Parameters:
blob- theBlobto unwrap- Returns:
- the wrapped
DataHandler, ornullif the blob doesn't wrap aDataHandler
-
toDataHandler
Get aDataHandlerfor the givenBlob. If the blob was obtained fromtoBlob(DataHandler), the originalDataHandleris returned.- Parameters:
blob- theBlobto convert- Returns:
- a
DataHandlerrepresenting theBlob
-
toBlob
Get aBlobfor the givenDataHandler. If theDataHandlerwas obtained fromtoDataHandler(Blob), the originalBlobis returned.- Parameters:
dh- theDataHandlerto convert- Returns:
- a
Blobrepresenting theDataHandler
-