|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.mail.CmsVfsDataSource
public class CmsVfsDataSource
DataSource wrapper for VFS resources, allows easy sending of VFS resources as email attachments.
Constructor Summary | |
---|---|
CmsVfsDataSource(CmsObject cms,
CmsResource resource)
Creates a new data source for the given VFS resource. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsVfsDataSource(CmsObject cms, CmsResource resource) throws CmsException
cms
- the current users OpenCms contextresource
- the resource to use
CmsException
- in case of errors accessing the resource in the VFSMethod Detail |
---|
public java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
DataSource.getContentType()
public java.io.InputStream getInputStream()
getInputStream
in interface javax.activation.DataSource
DataSource.getInputStream()
public java.lang.String getName()
getName
in interface javax.activation.DataSource
DataSource.getName()
public java.io.OutputStream getOutputStream()
This method will just return a new
.ByteArrayOutputStream
getOutputStream
in interface javax.activation.DataSource
DataSource.getOutputStream()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |