fr.paris.lutece.util.mail
Class ByteArrayDataSource

java.lang.Object
  extended by fr.paris.lutece.util.mail.ByteArrayDataSource
All Implemented Interfaces:
java.io.Serializable, javax.activation.DataSource

public class ByteArrayDataSource
extends java.lang.Object
implements javax.activation.DataSource, java.io.Serializable

This class is used by MailUtil.

See Also:
Serialized Form

Constructor Summary
ByteArrayDataSource(byte[] data, java.lang.String type)
          Creates a new ByteArrayDataSource object.
ByteArrayDataSource(java.lang.String data, java.lang.String type)
          Creates a new ByteArrayDataSource object.
 
Method Summary
 java.lang.String getContentType()
           
 java.io.InputStream getInputStream()
           
 java.lang.String getName()
           
 java.io.OutputStream getOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayDataSource

public ByteArrayDataSource(java.lang.String data,
                           java.lang.String type)
Creates a new ByteArrayDataSource object.

Parameters:
data - The data
type - The parameters

ByteArrayDataSource

public ByteArrayDataSource(byte[] data,
                           java.lang.String type)
Creates a new ByteArrayDataSource object.

Parameters:
data - The data
type - The parameters
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface javax.activation.DataSource
Returns:
The input stream
Throws:
java.io.IOException - The IO exception

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Specified by:
getOutputStream in interface javax.activation.DataSource
Returns:
The output stream
Throws:
java.io.IOException - The IO exception

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface javax.activation.DataSource
Returns:
The content type

getName

public java.lang.String getName()
Specified by:
getName in interface javax.activation.DataSource
Returns:
The Name


Copyright © 2011 Mairie de Paris. All Rights Reserved.