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 DataHandler
getDataHandler
(Blob blob) Get theDataHandler
wrapped by the givenBlob
.static Blob
toBlob
(DataHandler dh) Get aBlob
for the givenDataHandler
.static DataHandler
toDataHandler
(Blob blob) Get aDataHandler
for the givenBlob
.
-
Method Details
-
getDataHandler
Get theDataHandler
wrapped by the givenBlob
.- Parameters:
blob
- theBlob
to unwrap- Returns:
- the wrapped
DataHandler
, ornull
if the blob doesn't wrap aDataHandler
-
toDataHandler
Get aDataHandler
for the givenBlob
. If the blob was obtained fromtoBlob(DataHandler)
, the originalDataHandler
is returned.- Parameters:
blob
- theBlob
to convert- Returns:
- a
DataHandler
representing theBlob
-
toBlob
Get aBlob
for the givenDataHandler
. If theDataHandler
was obtained fromtoDataHandler(Blob)
, the originalBlob
is returned.- Parameters:
dh
- theDataHandler
to convert- Returns:
- a
Blob
representing theDataHandler
-