Examples of InputStreamDataSource


Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

    }

    public Object readFrom(Class cls, Type genericType, Annotation[] annotations,
                               MediaType type, MultivaluedMap headers, InputStream is)
        throws IOException {
        DataSource ds = new InputStreamDataSource(is, type.toString());
        return DataSource.class.isAssignableFrom(cls) ? ds : new DataHandler(ds);
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        Class<T> cls = (Class<T>)obj.getClass();
        return getHandlerForObject(obj, cls, genericType, anns, mimeType, id);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        Class<T> cls = (Class<T>)obj.getClass();
        return getHandlerForObject(obj, cls, genericType, anns, mimeType, id);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        Class<T> cls = (Class<T>)obj.getClass();
        return getHandlerForObject(obj, cls, genericType, anns, mimeType, id);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        }
        return new MessageBodyWriterDataHandler(r, obj, cls, genericType, anns, mt);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        }
        return new MessageBodyWriterDataHandler(r, obj, cls, genericType, anns, mt);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        DataSource ds = null;
        if (cls == FileDataSource.class) {
            File file = new BinaryDataProvider<File>().readFrom(File.class, File.class, annotations, type, headers, is);
            ds = new FileDataSource(file);   
        } else if (cls == DataSource.class || cls == DataHandler.class) {
            ds = new InputStreamDataSource(is, type.toString());
        } else {
            LOG.warning("Unsupported DataSource class: " + cls.getName());
            throw ExceptionUtils.toWebApplicationException(null, null);
        }
        return cls.cast(DataSource.class.isAssignableFrom(cls) ? ds : new DataHandler(ds));
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        }
        return new MessageBodyWriterDataHandler(r, obj, cls, genericType, anns, mt);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        Class<T> cls = (Class<T>)obj.getClass();
        return getHandlerForObject(obj, cls, genericType, anns, mimeType, id);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource

        }
        return new MessageBodyWriterDataHandler(r, obj, cls, genericType, anns, mt);
    }
   
    private DataHandler createInputStreamDH(InputStream is, String mimeType) {
        return new DataHandler(new InputStreamDataSource(is, mimeType));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.