public class ByteArrayDataSource
extends java.lang.Object
implements javax.activation.DataSource
Modifier and Type | Field and Description |
---|---|
private java.io.ByteArrayOutputStream |
data |
private java.lang.String |
name |
private java.lang.String |
type |
Constructor and Description |
---|
ByteArrayDataSource(java.io.InputStream is) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream() |
java.lang.String |
getName() |
java.io.OutputStream |
getOutputStream() |
void |
setName(java.lang.String name) |
void |
setType(java.lang.String type) |
private java.io.ByteArrayOutputStream data
private java.lang.String type
private java.lang.String name
public ByteArrayDataSource(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public void setType(java.lang.String type)
type
- the type to setpublic void setName(java.lang.String name)
name
- the name to setpublic java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.activation.DataSource
java.io.IOException
public java.lang.String getName()
getName
in interface javax.activation.DataSource
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface javax.activation.DataSource
java.io.IOException