Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.clra.util
Class ByteArrayDataSource  view ByteArrayDataSource download ByteArrayDataSource.java

java.lang.Object
  extended bycom.clra.util.ByteArrayDataSource
All Implemented Interfaces:
javax.activation.DataSource

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

Used to create a DataSource for the mail message.


Field Summary
private  byte[] data
           
private  java.lang.String type
           
 
Constructor Summary
(package private) ByteArrayDataSource(java.lang.String data, java.lang.String type)
          Create a DataSource from a String
 
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
 

Field Detail

data

private byte[] data

type

private java.lang.String type
Constructor Detail

ByteArrayDataSource

ByteArrayDataSource(java.lang.String data,
                    java.lang.String type)
Create a DataSource from a String

Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface javax.activation.DataSource

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Specified by:
getOutputStream in interface javax.activation.DataSource

getContentType

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

getName

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