|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.ByteArrayDataSource
public class ByteArrayDataSource
A DataSource based on the Java Mail Example. This class implements a DataSource from: an InputStream a byte array a String
| Constructor Summary | |
|---|---|
ByteArrayDataSource(byte[] data,
String type)
Create a DataSource from a byte array |
|
ByteArrayDataSource(InputStream is,
String type)
Create a DataSource from an input stream |
|
ByteArrayDataSource(String stringData,
String charSetName,
String type)
Create a DataSource from a String |
|
| Method Summary | |
|---|---|
String |
getContentType()
Get Content Type |
InputStream |
getInputStream()
Return an InputStream for the data. |
String |
getName()
Return Name or Class Name & Content Type |
OutputStream |
getOutputStream()
Throws exception |
ByteArrayDataSource |
setName(String name)
Set Name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArrayDataSource(InputStream is,
String type)
is - streamtype - optional MIME type e.g. text/html
public ByteArrayDataSource(byte[] data,
String type)
data - datatype - type e.g. text/html
public ByteArrayDataSource(String stringData,
String charSetName,
String type)
stringData - contentcharSetName - optional if null/empty uses UTF-8type - optional MIME type e.g. text/html| Method Detail |
|---|
public InputStream getInputStream()
throws IOException
getInputStream in interface DataSourceIOException
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface DataSourceIOExceptionpublic String getContentType()
getContentType in interface DataSourcepublic ByteArrayDataSource setName(String name)
name - name
public String getName()
getName in interface DataSource
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||