org.apache.turbine.util.mail
Class ByteArrayDataSource

java.lang.Object
  extended byorg.apache.turbine.util.mail.ByteArrayDataSource
All Implemented Interfaces:
javax.activation.DataSource

Deprecated. Use org.apache.commons.mail.ByteArrayDataSource instead.

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

This class implements a typed DataSource from:
- an InputStream
- a byte array
- a String

Version:
$Id: ByteArrayDataSource.java 264148 2005-08-29 14:21:04Z henning $
Author:
Jon S. Stevens, Brett McLaughlin

Constructor Summary
ByteArrayDataSource(byte[] data, java.lang.String type)
          Deprecated. Create a datasource from a byte array.
ByteArrayDataSource(java.io.InputStream is, java.lang.String type)
          Deprecated. Create a datasource from an input stream.
ByteArrayDataSource(java.lang.String data, java.lang.String type)
          Deprecated. Create a datasource from a String.
 
Method Summary
 java.lang.String getContentType()
          Deprecated. Get the content type.
 java.io.InputStream getInputStream()
          Deprecated. Get the input stream.
 java.lang.String getName()
          Deprecated. Get the name.
 java.io.OutputStream getOutputStream()
          Deprecated. Get the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayDataSource

public ByteArrayDataSource(byte[] data,
                           java.lang.String type)
Deprecated. 
Create a datasource from a byte array.

Parameters:
data - A byte[].
type - A String.

ByteArrayDataSource

public ByteArrayDataSource(java.io.InputStream is,
                           java.lang.String type)
Deprecated. 
Create a datasource from an input stream.

Parameters:
is - An InputStream.
type - A String.

ByteArrayDataSource

public ByteArrayDataSource(java.lang.String data,
                           java.lang.String type)
Deprecated. 
Create a datasource from a String.

Parameters:
data - A String.
type - A String.
Method Detail

getContentType

public java.lang.String getContentType()
Deprecated. 
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
Deprecated. 
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()
Deprecated. 
Get the name.

Specified by:
getName in interface javax.activation.DataSource
Returns:
A String.

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Deprecated. 
Get the output stream.

Specified by:
getOutputStream in interface javax.activation.DataSource
Returns:
An OutputStream.
Throws:
IOException.
java.io.IOException


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.