Package com.spun.util
Class ByteArrayDataSource
java.lang.Object
com.spun.util.ByteArrayDataSource
- All Implemented Interfaces:
DataSource
Comment By LLewellyn: This is a needed class for using mail. For some reason wasn't
made as part of the standard mail package.
A simple DataSource for demonstration purposes. This class implements a DataSource from: an InputStream a byte array a String
- Author:
- John Mani, Bill Shannon, Max Spivak
-
Constructor Summary
ConstructorsConstructorDescriptionByteArrayDataSource(byte[] data, String type) ByteArrayDataSource(InputStream is, String type) ByteArrayDataSource(InputStream is, String type, String name) ByteArrayDataSource(String data, String type) ByteArrayDataSource(String data, String type, String name) -
Method Summary
-
Constructor Details
-
ByteArrayDataSource
-
ByteArrayDataSource
-
ByteArrayDataSource
-
ByteArrayDataSource
-
ByteArrayDataSource
-
-
Method Details
-
setName
-
getInputStream
Return an InputStream for the data. Note - a new stream must be returned each time.- Specified by:
getInputStreamin interfaceDataSource
-
getOutputStream
- Specified by:
getOutputStreamin interfaceDataSource
-
getContentType
- Specified by:
getContentTypein interfaceDataSource
-
getName
- Specified by:
getNamein interfaceDataSource
-