Class ZipFileStore

java.lang.Object
org.applecommander.archive.zip.ZipFileStore
All Implemented Interfaces:
CapabilityProvider, FileStore, Container, InformationProvider

public class ZipFileStore extends Object implements FileStore
  • Constructor Details

    • ZipFileStore

      public ZipFileStore(Source source)
  • Method Details

    • getZipInputStream

      public ZipInputStream getZipInputStream() throws IOException
      Throws:
      IOException
    • getLabel

      public String getLabel()
      Description copied from interface: FileStore
      The label is a mechanism to distinguish multiple file stores in a single file. For instance, UniDOS has two file stores in the file, so it would have two different labels such as "Disk 1" and "Disk 2".
      Specified by:
      getLabel in interface FileStore
    • getRootDirectory

      public ZipDirectory getRootDirectory()
      Description copied from interface: FileStore
      All FileStores support a "root" directory that references all files.
      Specified by:
      getRootDirectory in interface FileStore
    • getPathSeparator

      public String getPathSeparator()
      Description copied from interface: FileStore
      This is the path separator character.
      Specified by:
      getPathSeparator in interface FileStore
    • getDisplayColumns

      public List<DisplayColumn> getDisplayColumns()
      Description copied from interface: FileStore
      Yields a list of columns to be used in this display mode.
      Specified by:
      getDisplayColumns in interface FileStore
    • flush

      public void flush()
      Description copied from interface: FileStore

      Flush any pending writes back to the source. This is intended to handle archives as they do not have a fixed structure to write changes. flush should be invoked before a save.

      Example usage:

      FileStore fileStore = fileStoreSelection.getSelectedItem();
      fileStore.flush();
      Source source = fileStore.get(Source.class).orElseThrow();
      source.save();
      
      Specified by:
      flush in interface FileStore
    • can

      public boolean can(Capability capability)
      Description copied from interface: CapabilityProvider
      Helps identify capabilities of the existing component.
      Specified by:
      can in interface CapabilityProvider
    • get

      public <T> Optional<T> get(Class<T> iface)
      Specified by:
      get in interface Container
    • information

      public List<InformationGroup> information()
      Specified by:
      information in interface InformationProvider