|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.mail.util.ByteArrayDataSource
public final class ByteArrayDataSource
A DataSource backed by a byte array. The byte array may be passed in directly, or may be initialized from an InputStream or a String.
| コンストラクタの概要 | |
|---|---|
ByteArrayDataSource(byte[] data,
String type)
Create a ByteArrayDataSource with data from the specified byte array and with the specified MIME type. |
|
ByteArrayDataSource(InputStream is,
String type)
Create a ByteArrayDataSource with data from the specified InputStream and with the specified MIME type. |
|
ByteArrayDataSource(String data,
String type)
Create a ByteArrayDataSource with data from the specified String and with the specified MIME type. |
|
| メソッドの概要 | |
|---|---|
String |
getContentType()
Get the MIME content type of the data. |
InputStream |
getInputStream()
Return an InputStream for the data. |
String |
getName()
Get the name of the data. |
OutputStream |
getOutputStream()
Return an OutputStream for the data. |
void |
setName(String name)
Set the name of the data. |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public ByteArrayDataSource(InputStream is,
String type)
throws IOException
is - the InputStreamtype - the MIME type
IOException - errors reading the stream
public ByteArrayDataSource(byte[] data,
String type)
data - the datatype - the MIME type
public ByteArrayDataSource(String data,
String type)
throws IOException
data - the Stringtype - the MIME type
IOException - errors reading the String| メソッドの詳細 |
|---|
public InputStream getInputStream()
throws IOException
IOException
public OutputStream getOutputStream()
throws IOException
IOExceptionpublic String getContentType()
public String getName()
public void setName(String name)
name -
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||