Package org.apache.cxf.attachment
Class LazyDataSource
- java.lang.Object
- 
- org.apache.cxf.attachment.LazyDataSource
 
- 
- All Implemented Interfaces:
- javax.activation.DataSource
 
 public class LazyDataSource extends Object implements javax.activation.DataSource A DataSource which will search through a Collection of attachments so as to lazily load the attachment from the collection. This allows streaming attachments with databinding toolkits like JAXB.
- 
- 
Constructor SummaryConstructors Constructor Description LazyDataSource(String id, Collection<Attachment> attachments)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()javax.activation.DataSourcegetDataSource()InputStreamgetInputStream()StringgetName()OutputStreamgetOutputStream()voidsetDataSource(javax.activation.DataSource dataSource)
 
- 
- 
- 
Constructor Detail- 
LazyDataSourcepublic LazyDataSource(String id, Collection<Attachment> attachments) 
 
- 
 - 
Method Detail- 
getContentTypepublic String getContentType() - Specified by:
- getContentTypein interface- javax.activation.DataSource
 
 - 
getInputStreampublic InputStream getInputStream() throws IOException - Specified by:
- getInputStreamin interface- javax.activation.DataSource
- Throws:
- IOException
 
 - 
getNamepublic String getName() - Specified by:
- getNamein interface- javax.activation.DataSource
 
 - 
getOutputStreampublic OutputStream getOutputStream() throws IOException - Specified by:
- getOutputStreamin interface- javax.activation.DataSource
- Throws:
- IOException
 
 - 
getDataSourcepublic javax.activation.DataSource getDataSource() 
 - 
setDataSourcepublic void setDataSource(javax.activation.DataSource dataSource) 
 
- 
 
-