public class UESByteSource extends java.lang.Object implements UESStreamSource
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
contentType |
protected byte[] |
data |
static java.lang.String |
DEFAULT_CONTENT_TYPE |
static java.lang.String |
DEFAULT_NAME |
protected java.lang.String |
name |
protected java.io.ByteArrayOutputStream |
outStream |
Constructor and Description |
---|
UESByteSource()
Creates a new instance of UESByteSource.
|
UESByteSource(byte[] data)
Creates a new instance of UESByteSource.
|
UESByteSource(byte[] data,
Creates a new instance of UESByteSource.
|
UESByteSource(byte[] data,
Creates a new instance of UESByteSource.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream()
Create InputStream from data set in constructor, and there is no InputStream available
if OutputStream is created or if there is no data.
|
java.lang.String |
getName() |
java.io.OutputStream |
getOutputStream()
If you get OutputStream, you cannot get InputStream any more, and vice versa.
|
long |
getSize()
Returns data size in bytes.
|
byte[] |
toByteArray() |
data
- - source data for InputStream, if you give null value,
you cannot get InputStream instead Exception is throwncontentType
- - MIME content type of dataname
- - name of byte sourcedata
- - source data for InputStream, if you give null value,
you cannot get InputStream instead Exception is throwncontentType
- - MIME content type of dataname
- - name of byte sourcedata
- - source data for InputStream, if you give null value,
you cannot get InputStream instead Exception is throwncontentType
- - MIME content type of dataname
- - name of byte sourcegetInputStream
in interface javax.activation.DataSource
UESIORTException
DataSource.getInputStream()
getName
in interface javax.activation.DataSource
DataSource.getName()
getOutputStream
in interface javax.activation.DataSource
DataSource.getOutputStream()
UESStreamSource
getSize
in interface UESStreamSource
UESStreamSource.getSize()
getContentType
in interface javax.activation.DataSource
DataSource.getContentType()