Package fr.paris.lutece.util.mail
Class ByteArrayDataSource
java.lang.Object
fr.paris.lutece.util.mail.ByteArrayDataSource
- All Implemented Interfaces:
Serializable,javax.activation.DataSource
public class ByteArrayDataSource
extends Object
implements javax.activation.DataSource, Serializable
This class is used by MailUtil.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionByteArrayDataSource(byte[] data, String type) Creates a new ByteArrayDataSource object.ByteArrayDataSource(String data, String type) Creates a new ByteArrayDataSource object. -
Method Summary
-
Constructor Details
-
ByteArrayDataSource
Creates a new ByteArrayDataSource object.- Parameters:
data- The datatype- The parameters
-
ByteArrayDataSource
Creates a new ByteArrayDataSource object.- Parameters:
data- The datatype- The parameters
-
-
Method Details
-
getInputStream
- Specified by:
getInputStreamin interfacejavax.activation.DataSource- Returns:
- The input stream
- Throws:
IOException- The IO exception
-
getOutputStream
- Specified by:
getOutputStreamin interfacejavax.activation.DataSource- Returns:
- The output stream
- Throws:
IOException- The IO exception
-
getContentType
- Specified by:
getContentTypein interfacejavax.activation.DataSource- Returns:
- The content type
-
getName
- Specified by:
getNamein interfacejavax.activation.DataSource- Returns:
- The Name
-