org.olat.core.util.vfs
Class VFSMediaResource

java.lang.Object
  extended by org.olat.core.util.vfs.VFSMediaResource
All Implemented Interfaces:
MediaResource

public class VFSMediaResource
extends java.lang.Object
implements MediaResource


Constructor Summary
VFSMediaResource(VFSLeaf vfsLeaf)
           
 
Method Summary
 java.lang.String getContentType()
           
 java.io.InputStream getInputStream()
           
 java.lang.Long getLastModified()
           
 java.lang.Long getSize()
           
 void prepare(javax.servlet.http.HttpServletResponse hres)
           
 void release()
           
 void setDownloadable(boolean downloadable)
           
 void setEncoding(java.lang.String encoding)
          if set, then content type will be modified such that the encoding is appended, e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFSMediaResource

public VFSMediaResource(VFSLeaf vfsLeaf)
Method Detail

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface MediaResource
Returns:

getSize

public java.lang.Long getSize()
Specified by:
getSize in interface MediaResource
Returns:

getInputStream

public java.io.InputStream getInputStream()
Specified by:
getInputStream in interface MediaResource
Returns:

getLastModified

public java.lang.Long getLastModified()
Specified by:
getLastModified in interface MediaResource
Returns:

prepare

public void prepare(javax.servlet.http.HttpServletResponse hres)
Specified by:
prepare in interface MediaResource
See Also:
MediaResource.prepare(javax.servlet.http.HttpServletResponse)

release

public void release()
Specified by:
release in interface MediaResource

setEncoding

public void setEncoding(java.lang.String encoding)
if set, then content type will be modified such that the encoding is appended, e.g. "text/html;charset=utf-8". Makes sense only for non-binary data

Parameters:
encoding - e.g. "iso-8859-1", or "utf-8"

setDownloadable

public void setDownloadable(boolean downloadable)