|
MDi JLib 1.7.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microdeveloper.data.ByteArrayDataSource
public class ByteArrayDataSource
A simple byte data source object for stream operations.
| Field Summary | |
|---|---|
(package private) byte[] |
bytes
|
(package private) String |
content
|
(package private) String |
contentType
|
(package private) String |
name
|
| Constructor Summary | |
|---|---|
ByteArrayDataSource(byte[] bytes,
String contentType,
String name)
Creates a new instance of ByteArrayDataSource and initializes it |
|
ByteArrayDataSource(String content,
String contentType)
Creates a new instance of ByteArrayDataSource and initializes it using String element |
|
| Method Summary | |
|---|---|
String |
getContentType()
Returns the established content type |
InputStream |
getInputStream()
Returns a new ByteArrayInputStream |
String |
getName()
Returns the current name of the element |
OutputStream |
getOutputStream()
Returns the output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
byte[] bytes
String content
String contentType
String name
| Constructor Detail |
|---|
public ByteArrayDataSource(String content,
String contentType)
content - content to establishcontentType - type of content (default is application/octet-stream)
public ByteArrayDataSource(byte[] bytes,
String contentType,
String name)
bytes - byte array content to establishcontentType - type of content (default is application/octet-stream)name - name to assign to the element| Method Detail |
|---|
public String getContentType()
getContentType in interface javax.activation.DataSourcepublic InputStream getInputStream()
getInputStream in interface javax.activation.DataSourcepublic String getName()
getName in interface javax.activation.DataSource
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface javax.activation.DataSourceIOException - thrown if the IO cannot be opened or read
|
MDi JLib 1.7.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||