Search in sources :

Example 1 with NioOutputStream

use of org.apache.cxf.jaxrs.nio.NioOutputStream in project cxf by apache.

the class BinaryDataProvider method copyUsingNio.

protected void copyUsingNio(InputStream is, OutputStream os, Continuation cont) {
    NioWriteListenerImpl listener = new NioWriteListenerImpl(cont, new NioWriteEntity(getNioHandler(is), null), new NioOutputStream(os));
    Message m = JAXRSUtils.getCurrentMessage();
    m.put(WriteListener.class, listener);
    cont.suspend(0);
}
Also used : Message(org.apache.cxf.message.Message) NioWriteEntity(org.apache.cxf.jaxrs.nio.NioWriteEntity) NioWriteListenerImpl(org.apache.cxf.jaxrs.nio.NioWriteListenerImpl) NioOutputStream(org.apache.cxf.jaxrs.nio.NioOutputStream)

Aggregations

NioOutputStream (org.apache.cxf.jaxrs.nio.NioOutputStream)1 NioWriteEntity (org.apache.cxf.jaxrs.nio.NioWriteEntity)1 NioWriteListenerImpl (org.apache.cxf.jaxrs.nio.NioWriteListenerImpl)1 Message (org.apache.cxf.message.Message)1