com.ibm.portal.resolver.data
Interface MultipartDataSource
- All Superinterfaces:
- Addressable, DataSource, DataSourceFragment, Disposable, TimeStamped
-
public interface MultipartDataSource
- extends DataSource
Support for producing multipart responses. The data provider streams the data
to the MultipartOutputStream.
- Since:
- 6.1.0
- Note:
This interface is designed to be implemented by clients. |
CONTENT_TYPE_MULTIPART
static final java.lang.String CONTENT_TYPE_MULTIPART
- Mime type for multipart messages
- Since:
- 6.1.0.3
- See Also:
- Constant Field Values
KEY_MIME_BOUNDARY
static final java.lang.String KEY_MIME_BOUNDARY
- Name of the mime key that specifies the multipart boundary
- Since:
- 6.1.0.3
- See Also:
- Constant Field Values
getContentType
java.lang.String getContentType()
- Mime type of the data. The return value must be a
MultipartStream.VALUE_MULTIPART primary mime-type that contains
the MultipartStream.KEY_MIME_BOUNDARY multipart boundary, e.g.
"multipart/mixed; boundary=47874839".
- Specified by:
- getContentType in interface DataSource
- Returns:
- mime type string, not null
- See Also:
- StreamFactory#createMultipartBoundary(int)
write
MultipartOutputStream write(MultipartOutputStream out)
throws java.io.IOException
- Copies the complete data onto the target stream. The target stream should
NOT be closed.
- Parameters:
- out - target stream to receive the data.
- Returns:
- reference to the target stream to allow method chaining
- Throws:
- java.io.IOException - - if the copy operation failed