com.ettrema.http.fs
Class FsFileResource

java.lang.Object
  extended by com.ettrema.http.fs.FsResource
      extended by com.ettrema.http.fs.FsFileResource
All Implemented Interfaces:
CopyableResource, DeletableResource, DigestResource, GetableResource, LockableResource, MoveableResource, PropFindableResource, PropPatchableResource, Resource

public class FsFileResource
extends FsResource
implements CopyableResource, DeletableResource, GetableResource, MoveableResource, PropFindableResource, PropPatchableResource


Constructor Summary
FsFileResource(java.lang.String host, FileSystemResourceFactory factory, java.io.File file)
           
 
Method Summary
 java.lang.String checkRedirect(Request arg0)
           
protected  void doCopy(java.io.File dest)
           
 java.lang.Long getContentLength()
           
 java.lang.String getContentType(java.lang.String preferredList)
           
 java.lang.Long getMaxAgeSeconds(Auth auth)
           
 void sendContent(java.io.OutputStream out, Range range, java.util.Map<java.lang.String,java.lang.String> params, java.lang.String contentType)
           
 void setProperties(PropPatchHandler.Fields fields)
          Deprecated. 
 
Methods inherited from class com.ettrema.http.fs.FsResource
authenticate, authenticate, authorise, compareTo, copyTo, delete, getCreateDate, getCurrentLock, getFile, getModifiedDate, getName, getRealm, getUniqueId, isDigestAllowed, lock, moveTo, refreshLock, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bradmcevoy.http.CopyableResource
copyTo
 
Methods inherited from interface com.bradmcevoy.http.DeletableResource
delete
 
Methods inherited from interface com.bradmcevoy.http.MoveableResource
moveTo
 
Methods inherited from interface com.bradmcevoy.http.PropFindableResource
getCreateDate
 
Methods inherited from interface com.bradmcevoy.http.Resource
authenticate, authorise, getModifiedDate, getName, getRealm, getUniqueId
 

Constructor Detail

FsFileResource

public FsFileResource(java.lang.String host,
                      FileSystemResourceFactory factory,
                      java.io.File file)
Parameters:
host - - the requested host. E.g. www.mycompany.com
factory -
file -
Method Detail

getContentLength

public java.lang.Long getContentLength()
Specified by:
getContentLength in interface GetableResource

getContentType

public java.lang.String getContentType(java.lang.String preferredList)
Specified by:
getContentType in interface GetableResource

checkRedirect

public java.lang.String checkRedirect(Request arg0)
Specified by:
checkRedirect in interface Resource

sendContent

public void sendContent(java.io.OutputStream out,
                        Range range,
                        java.util.Map<java.lang.String,java.lang.String> params,
                        java.lang.String contentType)
                 throws java.io.IOException
Specified by:
sendContent in interface GetableResource
Throws:
java.io.IOException

getMaxAgeSeconds

public java.lang.Long getMaxAgeSeconds(Auth auth)
Specified by:
getMaxAgeSeconds in interface GetableResource

doCopy

protected void doCopy(java.io.File dest)
Specified by:
doCopy in class FsResource

setProperties

@Deprecated
public void setProperties(PropPatchHandler.Fields fields)
Deprecated. 

Specified by:
setProperties in interface PropPatchableResource


Copyright © 2011. All Rights Reserved.