Class UrlVFS


  • public class UrlVFS
    extends VFS
    URL VFS.
    • Constructor Detail

      • UrlVFS

        public UrlVFS()
    • Method Detail

      • constructPath

        public java.lang.String constructPath​(java.lang.String parent,
                                              java.lang.String path)
        Description copied from class: VFS
        Constructs a path from the specified directory and file name component. This must be overridden to return a non-null value, otherwise browsing this filesystem will not work.

        Unless you are writing a VFS, this method should not be called directly. To ensure correct behavior, you must call MiscUtilities.constructPath(String,String) instead.

        Overrides:
        constructPath in class VFS
        Parameters:
        parent - The parent directory
        path - The path
      • _createInputStream

        public java.io.InputStream _createInputStream​(java.lang.Object session,
                                                      java.lang.String path,
                                                      boolean ignoreErrors,
                                                      java.awt.Component comp)
                                               throws java.io.IOException
        Description copied from class: VFS
        Creates an input stream. This method is called from the I/O thread.
        Overrides:
        _createInputStream in class VFS
        Parameters:
        session - the VFS session
        path - The path
        ignoreErrors - If true, file not found errors should be ignored
        comp - The component that will parent error dialog boxes
        Returns:
        an inputstream or null if there was a problem
        Throws:
        java.io.IOException - If an I/O error occurs
      • _createOutputStream

        public java.io.OutputStream _createOutputStream​(java.lang.Object session,
                                                        java.lang.String path,
                                                        java.awt.Component comp)
                                                 throws java.io.IOException
        Description copied from class: VFS
        Creates an output stream. This method is called from the I/O thread.
        Overrides:
        _createOutputStream in class VFS
        Parameters:
        session - the VFS session
        path - The path
        comp - The component that will parent error dialog boxes
        Throws:
        java.io.IOException - If an I/O error occurs
      • getFilePath

        public java.lang.String getFilePath​(java.lang.String vfsPath)
        Description copied from class: VFS
        Returns the path component of the specified VFS path. The standard implementation cuts off the protocol and the protocol separator character and then delegates to eventually present sub-VFS-paths present in the VFS path like "jode:archive:/test.zip!/test.txt".

        If a VFS implementation can have additional information in the VFS path like username / password / host / port for FTP VFS or archive filename for archive VFS, this method should be overridden to remove those information also. The easiest would be to remove those additional information and then delegate to super.getFilePath().

        Overrides:
        getFilePath in class VFS
        Parameters:
        vfsPath - The VFS path