Class HttpFileObject

  • All Implemented Interfaces:
    FileObject

    public class HttpFileObject
    extends AbstractFileObject
    A file object backed by commons httpclient.
    Version:
    $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
    Author:
    Adam Murdoch
    • Method Detail

      • doDetach

        protected void doDetach()
                         throws java.lang.Exception
        Detaches this file object from its file resource.
        Overrides:
        doDetach in class AbstractFileObject
        Throws:
        java.lang.Exception
      • doGetType

        protected FileType doGetType()
                              throws java.lang.Exception
        Determines the type of this file. Must not return null. The return value of this method is cached, so the implementation can be expensive.
        Specified by:
        doGetType in class AbstractFileObject
        Throws:
        java.lang.Exception
      • doListChildren

        protected java.lang.String[] doListChildren()
                                             throws java.lang.Exception
        Lists the children of this file.
        Specified by:
        doListChildren in class AbstractFileObject
        Throws:
        java.lang.Exception
      • doGetContentSize

        protected long doGetContentSize()
                                 throws java.lang.Exception
        Returns the size of the file content (in bytes).
        Specified by:
        doGetContentSize in class AbstractFileObject
        Throws:
        java.lang.Exception
      • doGetLastModifiedTime

        protected long doGetLastModifiedTime()
                                      throws java.lang.Exception
        Returns the last modified time of this file.

        This implementation throws an exception.

        Overrides:
        doGetLastModifiedTime in class AbstractFileObject
        Throws:
        java.lang.Exception
      • doGetInputStream

        protected java.io.InputStream doGetInputStream()
                                                throws java.lang.Exception
        Creates an input stream to read the file content from. Is only called if doGetType() returns FileType.FILE.

        It is guaranteed that there are no open output streams for this file when this method is called.

        The returned stream does not have to be buffered.

        Specified by:
        doGetInputStream in class AbstractFileObject
        Throws:
        java.lang.Exception
      • encodePath

        protected java.lang.String encodePath​(java.lang.String decodedPath)
                                       throws org.apache.commons.httpclient.URIException
        Throws:
        org.apache.commons.httpclient.URIException