程序包 com.sh.mail.core

类 ByteArrayDataSource

java.lang.Object
com.sh.mail.core.ByteArrayDataSource
所有已实现的接口:
jakarta.activation.DataSource

public class ByteArrayDataSource extends Object implements jakarta.activation.DataSource

Description: This class implements a typed DataSource from:
- an InputStream
- a byte array
- a String

Title:首亨软件 - TSS/CRM等

从以下版本开始:
Aug 13, 2012
  • 字段详细资料

    • BUFFER_SIZE

      public static final int BUFFER_SIZE
      define the buffer size
      另请参阅:
  • 构造器详细资料

    • ByteArrayDataSource

      public ByteArrayDataSource(byte[] data, String aType) throws IOException
      Create a datasource from a byte array.
      参数:
      data - A byte[].
      aType - A String.
      抛出:
      IOException - IOException
      从以下版本开始:
      1.0
    • ByteArrayDataSource

      public ByteArrayDataSource(InputStream aIs, String aType) throws IOException
      Create a datasource from an input stream.
      参数:
      aIs - An InputStream.
      aType - A String.
      抛出:
      IOException - IOException
      从以下版本开始:
      1.0
    • ByteArrayDataSource

      public ByteArrayDataSource(String data, String aType) throws IOException
      Create a datasource from a String.
      参数:
      data - A String.
      aType - A String.
      抛出:
      IOException - IOException
      从以下版本开始:
      1.0
  • 方法详细资料

    • getContentType

      public String getContentType()
      Get the content type.
      指定者:
      getContentType 在接口中 jakarta.activation.DataSource
      返回:
      A String.
      从以下版本开始:
      1.0
    • getInputStream

      public InputStream getInputStream() throws IOException
      Get the input stream.
      指定者:
      getInputStream 在接口中 jakarta.activation.DataSource
      返回:
      An InputStream.
      抛出:
      IOException - IOException
      从以下版本开始:
      1.0
    • getName

      public String getName()
      Get the name.
      指定者:
      getName 在接口中 jakarta.activation.DataSource
      返回:
      A String.
      从以下版本开始:
      1.0
    • getOutputStream

      public OutputStream getOutputStream()
      Get the OutputStream to write to
      指定者:
      getOutputStream 在接口中 jakarta.activation.DataSource
      返回:
      An OutputStream
      从以下版本开始:
      1.0