Class PureZipFileSystem

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.jboss.vfs.spi.FileSystem

    public final class PureZipFileSystem
    extends Object
    implements org.jboss.vfs.spi.FileSystem

    This implementation is backed by a zip file. The provided file must be owned by this instance; otherwise, if the file disappears unexpectedly, the filesystem will malfunction.

    Author:
    David M. Lloyd, Ales Justin
    • Constructor Detail

      • PureZipFileSystem

        public PureZipFileSystem​(File archiveFile)
                          throws IOException
        Create a new instance.
        Parameters:
        archiveFile - the original archive file
        Throws:
        IOException - if an I/O error occurs
    • Method Detail

      • getFile

        public File getFile​(org.jboss.vfs.VirtualFile mountPoint,
                            org.jboss.vfs.VirtualFile target)
                     throws IOException
        Specified by:
        getFile in interface org.jboss.vfs.spi.FileSystem
        Throws:
        IOException
      • openInputStream

        public InputStream openInputStream​(org.jboss.vfs.VirtualFile mountPoint,
                                           org.jboss.vfs.VirtualFile target)
                                    throws IOException
        Specified by:
        openInputStream in interface org.jboss.vfs.spi.FileSystem
        Throws:
        IOException
      • delete

        public boolean delete​(org.jboss.vfs.VirtualFile mountPoint,
                              org.jboss.vfs.VirtualFile target)
        Specified by:
        delete in interface org.jboss.vfs.spi.FileSystem
      • getSize

        public long getSize​(org.jboss.vfs.VirtualFile mountPoint,
                            org.jboss.vfs.VirtualFile target)
        Specified by:
        getSize in interface org.jboss.vfs.spi.FileSystem
      • getLastModified

        public long getLastModified​(org.jboss.vfs.VirtualFile mountPoint,
                                    org.jboss.vfs.VirtualFile target)
        Specified by:
        getLastModified in interface org.jboss.vfs.spi.FileSystem
      • exists

        public boolean exists​(org.jboss.vfs.VirtualFile mountPoint,
                              org.jboss.vfs.VirtualFile target)
        Specified by:
        exists in interface org.jboss.vfs.spi.FileSystem
      • isFile

        public boolean isFile​(org.jboss.vfs.VirtualFile mountPoint,
                              org.jboss.vfs.VirtualFile target)
        Specified by:
        isFile in interface org.jboss.vfs.spi.FileSystem
      • isDirectory

        public boolean isDirectory​(org.jboss.vfs.VirtualFile mountPoint,
                                   org.jboss.vfs.VirtualFile target)
        Specified by:
        isDirectory in interface org.jboss.vfs.spi.FileSystem
      • getDirectoryEntries

        public List<String> getDirectoryEntries​(org.jboss.vfs.VirtualFile mountPoint,
                                                org.jboss.vfs.VirtualFile target)
        Specified by:
        getDirectoryEntries in interface org.jboss.vfs.spi.FileSystem
      • getCodeSigners

        public CodeSigner[] getCodeSigners​(org.jboss.vfs.VirtualFile mountPoint,
                                           org.jboss.vfs.VirtualFile target)
        Specified by:
        getCodeSigners in interface org.jboss.vfs.spi.FileSystem
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in interface org.jboss.vfs.spi.FileSystem
      • getMountSource

        public File getMountSource()
        Specified by:
        getMountSource in interface org.jboss.vfs.spi.FileSystem