Package com.sun.xml.ws.encoding
Class MIMEPartStreamingDataHandler
- java.lang.Object
-
- jakarta.activation.DataHandler
-
- org.jvnet.staxex.StreamingDataHandler
-
- com.sun.xml.ws.developer.StreamingDataHandler
-
- com.sun.xml.ws.encoding.MIMEPartStreamingDataHandler
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MIMEPartStreamingDataHandler extends StreamingDataHandler
Implementation ofStreamingDataHandlerto access MIME attachments efficiently. Applications can use the additional methods and decide on how to access the attachment data in JAX-WS applications.for e.g.: DataHandler dh = proxy.getData(); StreamingDataHandler sdh = (StreamingDataHandler)dh; // readOnce() doesn't store attachment on the disk in some cases // for e.g when only one huge attachment after soap envelope part in MIME message InputStream in = sdh.readOnce(); ... in.close(); sdh.close();
- Author:
- Jitendra Kotamraju
-
-
Constructor Summary
Constructors Constructor Description MIMEPartStreamingDataHandler(org.jvnet.mimepull.MIMEPart part)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidmoveTo(File file)InputStreamreadOnce()-
Methods inherited from class jakarta.activation.DataHandler
getAllCommands, getBean, getCommand, getContent, getContentType, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeTo
-
-
-
-
Method Detail
-
readOnce
public InputStream readOnce() throws IOException
- Specified by:
readOncein classorg.jvnet.staxex.StreamingDataHandler- Throws:
IOException
-
moveTo
public void moveTo(File file) throws IOException
- Specified by:
moveToin classorg.jvnet.staxex.StreamingDataHandler- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.jvnet.staxex.StreamingDataHandler- Throws:
IOException
-
-