public class CmsVfsDataSource
extends java.lang.Object
implements javax.activation.DataSource
| 构造器和说明 |
|---|
CmsVfsDataSource(CmsObject cms,
CmsResource resource)
Creates a new data source for the given VFS resource.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream()
Returns an input stream baded on the file contents.
|
java.lang.String |
getName()
Returns the root path of the given resource.
|
java.io.OutputStream |
getOutputStream()
Don't use this method, VFS resources can't be written using this datasource class.
|
public CmsVfsDataSource(CmsObject cms, CmsResource resource) throws CmsException
cms - the current users OpenCms contextresource - the resource to useCmsException - in case of errors accessing the resource in the VFSpublic java.lang.String getContentType()
getContentType 在接口中 javax.activation.DataSourceDataSource.getContentType()public java.io.InputStream getInputStream()
getInputStream 在接口中 javax.activation.DataSourceDataSource.getInputStream()public java.lang.String getName()
getName 在接口中 javax.activation.DataSourceDataSource.getName()public java.io.OutputStream getOutputStream()
This method will just return a new .ByteArrayOutputStream
getOutputStream 在接口中 javax.activation.DataSourceDataSource.getOutputStream()