InputStreamDataSource¶
-
public class
InputStreamDataSource
implements DataSource¶ InputStreamDataSource is an implementation of the javax.activation.DataSource It is designed to be used by SOAPMailSender as a bridge of InputStream and OutputStream for base64 encoding transformation.
Author: Philip Wong
Constructors¶
InputStreamDataSource¶
-
public
InputStreamDataSource
(InputStream is, String contentType, String name)¶ Creates a new instance of InputStreamDataSource by BodyPart.
Parameters: - is – the input stream.
- contentType – the content type.
- name – the filename if any.
Methods¶
getContentType¶
getInputStream¶
-
public InputStream
getInputStream
()¶ Gets the input stream.
Returns: the input stream when this data source created.
getName¶
getOutputStream¶
-
public OutputStream
getOutputStream
()¶ Returns new byte array from a new BytesArrayOutStream always. Logically, it is required to copy binary content from the input stream to output stream. But it is found the same result without touching binary content.
Returns: the content type when this data source created.