public class CmsByteArrayDataSource
extends java.lang.Object
implements javax.activation.DataSource
构造器和说明 |
---|
CmsByteArrayDataSource(java.lang.String name,
byte[] data,
java.lang.String contentType)
Creates a ByteArrayDataSource with data from the specified byte array and with the specified MIME type.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream() |
java.lang.String |
getName() |
java.io.OutputStream |
getOutputStream() |
public CmsByteArrayDataSource(java.lang.String name, byte[] data, java.lang.String contentType)
name
- the name of the datadata
- the datacontentType
- the MIME content type of the datapublic java.lang.String getContentType()
getContentType
在接口中 javax.activation.DataSource
DataSource.getContentType()
public java.io.InputStream getInputStream()
getInputStream
在接口中 javax.activation.DataSource
DataSource.getInputStream()
public java.lang.String getName()
getName
在接口中 javax.activation.DataSource
DataSource.getName()
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
在接口中 javax.activation.DataSource
java.io.IOException
DataSource.getOutputStream()