ByteArrayDataSource
instead@Deprecated
public class ByteArrayDataSource
extends java.lang.Object
implements javax.activation.DataSource
From version 1.3.1, it is possible to set a name for this DataSource, and it is recommended to do so.
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE
Deprecated.
Define the buffer size.
|
Constructor and Description |
---|
ByteArrayDataSource(byte[] data,
java.lang.String aType)
Deprecated.
Create a datasource from a byte array.
|
ByteArrayDataSource(java.io.InputStream aIs,
java.lang.String aType)
Deprecated.
Create a datasource from an input stream.
|
ByteArrayDataSource(java.lang.String data,
java.lang.String aType)
Deprecated.
Create a datasource from a String.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Deprecated.
Get the content type.
|
java.io.InputStream |
getInputStream()
Deprecated.
Get the input stream.
|
java.lang.String |
getName()
Deprecated.
Get the name.
|
java.io.OutputStream |
getOutputStream()
Deprecated.
Get the OutputStream to write to.
|
void |
setName(java.lang.String name)
Deprecated.
Sets the name for this DataSource.
|
public static final int BUFFER_SIZE
public ByteArrayDataSource(byte[] data, java.lang.String aType) throws java.io.IOException
data
- A byte[].aType
- A String.java.io.IOException
- IOExceptionpublic ByteArrayDataSource(java.io.InputStream aIs, java.lang.String aType) throws java.io.IOException
aIs
- An InputStream.aType
- A String.java.io.IOException
- IOExceptionpublic ByteArrayDataSource(java.lang.String data, java.lang.String aType) throws java.io.IOException
data
- A String.aType
- A String.java.io.IOException
- IOExceptionpublic java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.activation.DataSource
java.io.IOException
- IOExceptionpublic void setName(java.lang.String name)
name
- The name.public java.lang.String getName()
getName
in interface javax.activation.DataSource
public java.io.OutputStream getOutputStream()
getOutputStream
in interface javax.activation.DataSource
Copyright © 2010 - 2020 Adobe. All Rights Reserved