Skip navigation links


com.essbase.eas.ui.email
Class StringDataSource

java.lang.Object
  extended by com.essbase.eas.ui.email.StringDataSource

All Implemented Interfaces:
javax.activation.DataSource

public class StringDataSource
extends java.lang.Object
implements javax.activation.DataSource

Constructor Summary
StringDataSource(byte[] data, java.lang.String type, java.lang.String name)
          Create a datasource from a byte array.
StringDataSource(java.io.InputStream is, java.lang.String type, java.lang.String name)
          Create a datasource from an input stream.
StringDataSource(java.lang.String data, java.lang.String type, java.lang.String name, java.lang.String charset)
          Create a datasource from a String.

 

Method Summary
 void dispose()
           
 java.lang.String getContentType()
          Get the content type.
 java.io.InputStream getInputStream()
          Get the input stream.
 java.lang.String getName()
          Get the name.
 java.io.OutputStream getOutputStream()
          Get the output stream.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

StringDataSource

public StringDataSource(byte[] data,
                        java.lang.String type,
                        java.lang.String name)
Create a datasource from a byte array.
Parameters:
data - A byte[].
type - A String representing a Mime Content-Type
name - A String the name for this attachment

StringDataSource

public StringDataSource(java.io.InputStream is,
                        java.lang.String type,
                        java.lang.String name)
Create a datasource from an input stream.
Parameters:
is - An InputStream.
type - A String.
name - A String representing the name of this attachment

StringDataSource

public StringDataSource(java.lang.String data,
                        java.lang.String type,
                        java.lang.String name,
                        java.lang.String charset)
Create a datasource from a String.
Parameters:
data - A String.
type - A String.

Method Detail

getContentType

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

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get the input stream.
Specified by:
getInputStream in interface javax.activation.DataSource
Returns:
An InputStream.
Throws:
IOException.
java.io.IOException

getName

public java.lang.String getName()
Get the name.
Specified by:
getName in interface javax.activation.DataSource
Returns:
A String.

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the output stream.
Specified by:
getOutputStream in interface javax.activation.DataSource
Returns:
An OutputStream.
Throws:
IOException.
java.io.IOException

dispose

public void dispose()

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.