Class HttpFileObject<FS extends HttpFileSystem>

    • Constructor Detail

      • HttpFileObject

        protected HttpFileObject​(AbstractFileName fileName,
                                 FS fileSystem)
        Deprecated.
        Constructs a new instance.
        Parameters:
        fileName - the file name.
        fileSystem - the file system.
    • Method Detail

      • doDetach

        protected void doDetach()
                         throws java.lang.Exception
        Deprecated.
        Detaches this file object from its file resource.
        Overrides:
        doDetach in class AbstractFileObject<FS extends HttpFileSystem>
        Throws:
        java.lang.Exception - if an error occurs.
      • doGetInputStream

        protected java.io.InputStream doGetInputStream​(int bufferSize)
                                                throws java.lang.Exception
        Deprecated.
        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.

        Overrides:
        doGetInputStream in class AbstractFileObject<FS extends HttpFileSystem>
        Parameters:
        bufferSize - Buffer size hint.
        Returns:
        An InputStream to read the file content.
        Throws:
        java.lang.Exception - if an error occurs.
      • doGetType

        protected FileType doGetType()
                              throws java.lang.Exception
        Deprecated.
        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<FS extends HttpFileSystem>
        Returns:
        the type of the file.
        Throws:
        java.lang.Exception - if an error occurs.
      • doListChildren

        protected java.lang.String[] doListChildren()
                                             throws java.lang.Exception
        Deprecated.
        Throws UnsupportedOperationException.
        Specified by:
        doListChildren in class AbstractFileObject<FS extends HttpFileSystem>
        Returns:
        a possible empty String array if the file is a directory or null or an exception if the file is not a directory or can't be read.
        Throws:
        java.lang.UnsupportedOperationException - always thrown.
        java.lang.Exception - if an error occurs.
      • encodePath

        protected java.lang.String encodePath​(java.lang.String unescaped)
                                       throws org.apache.commons.httpclient.URIException
        Deprecated.
        Encodes the given path.
        Parameters:
        unescaped - An unescaped path.
        Returns:
        the encoded path.
        Throws:
        org.apache.commons.httpclient.URIException - if the default protocol charset is not supported
      • getFollowRedirect

        protected boolean getFollowRedirect()
        Deprecated.
        Gets whether to follow redirects.
        Returns:
        whether to follow redirects.
      • getUrlCharset

        protected java.lang.String getUrlCharset()
        Deprecated.
        Gets the URL charset name.
        Returns:
        the URL charset name.
      • getUserAgent

        protected java.lang.String getUserAgent()
        Deprecated.
        Gets the user agent.
        Returns:
        the user agent.
      • setupMethod

        protected void setupMethod​(org.apache.commons.httpclient.HttpMethod method)
                            throws FileSystemException,
                                   org.apache.commons.httpclient.URIException
        Deprecated.
        Prepares a HttpMethod object.
        Parameters:
        method - The object which gets prepared to access the file object.
        Throws:
        FileSystemException - if an error occurs.
        org.apache.commons.httpclient.URIException - if path cannot be represented.
        Since:
        2.0 (was package)