com.sun.xml.ws.encoding
Class MIMEPartStreamingDataHandler
java.lang.Object
javax.activation.DataHandler
org.jvnet.staxex.StreamingDataHandler
com.sun.xml.ws.developer.StreamingDataHandler
com.sun.xml.ws.encoding.MIMEPartStreamingDataHandler
- All Implemented Interfaces:
- java.awt.datatransfer.Transferable, java.io.Closeable
public class MIMEPartStreamingDataHandler
- extends StreamingDataHandler
Implementation of StreamingDataHandler
to 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();
Methods inherited from class org.jvnet.staxex.StreamingDataHandler |
getHrefCid, setHrefCid |
Methods inherited from class javax.activation.DataHandler |
getAllCommands, getBean, getCommand, getContent, getContentType, getDataSource, getInputStream, getName, getOutputStream, getPreferredCommands, getTransferData, getTransferDataFlavors, isDataFlavorSupported, setCommandMap, setDataContentHandlerFactory, writeTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIMEPartStreamingDataHandler
public MIMEPartStreamingDataHandler(org.jvnet.mimepull.MIMEPart part)
readOnce
public java.io.InputStream readOnce()
throws java.io.IOException
- Specified by:
readOnce
in class org.jvnet.staxex.StreamingDataHandler
- Throws:
java.io.IOException
moveTo
public void moveTo(java.io.File file)
throws java.io.IOException
- Specified by:
moveTo
in class org.jvnet.staxex.StreamingDataHandler
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class org.jvnet.staxex.StreamingDataHandler
- Throws:
java.io.IOException
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.