Class UrlFileObject

    • Method Detail

      • createURL

        protected java.net.URL createURL​(FileName name)
                                  throws java.io.IOException
        Creates a URL from the given file name.
        Parameters:
        name - the file name.
        Returns:
        a new URL.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • doAttach

        protected void doAttach()
                         throws java.lang.Exception
        Attaches this file object to its file resource. This method is called before any of the doBlah() or onBlah() methods. Subclasses can use this method to perform lazy initialization.
        Overrides:
        doAttach in class AbstractFileObject<UrlFileSystem>
        Throws:
        java.lang.Exception - if an error occurs.
      • doGetInputStream

        protected java.io.InputStream doGetInputStream​(int bufferSize)
                                                throws java.lang.Exception
        Creates an input stream to read the file content from.
        Overrides:
        doGetInputStream in class AbstractFileObject<UrlFileSystem>
        Parameters:
        bufferSize - Buffer size hint.
        Returns:
        An InputStream to read the file content.
        Throws:
        java.lang.Exception - if an error occurs.
      • doListChildren

        protected java.lang.String[] doListChildren()
                                             throws java.lang.Exception
        Lists the children of the file.
        Specified by:
        doListChildren in class AbstractFileObject<UrlFileSystem>
        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.Exception - if an error occurs.