Package fr.paris.lutece.util.mail
Class ByteArrayDataSource
- java.lang.Object
-
- fr.paris.lutece.util.mail.ByteArrayDataSource
-
- All Implemented Interfaces:
Serializable,DataSource
public class ByteArrayDataSource extends Object implements DataSource, Serializable
This class is used by MailUtil.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteArrayDataSource(byte[] data, String type)Creates a new ByteArrayDataSource object.ByteArrayDataSource(String data, String type)Creates a new ByteArrayDataSource object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()InputStreamgetInputStream()StringgetName()OutputStreamgetOutputStream()
-
-
-
Constructor Detail
-
ByteArrayDataSource
public ByteArrayDataSource(String data, String type)
Creates a new ByteArrayDataSource object.- Parameters:
data- The datatype- The parameters
-
ByteArrayDataSource
public ByteArrayDataSource(byte[] data, String type)Creates a new ByteArrayDataSource object.- Parameters:
data- The datatype- The parameters
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceDataSource- Returns:
- The input stream
- Throws:
IOException- The IO exception
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfaceDataSource- Returns:
- The output stream
- Throws:
IOException- The IO exception
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceDataSource- Returns:
- The content type
-
getName
public String getName()
- Specified by:
getNamein interfaceDataSource- Returns:
- The Name
-
-