Class ZipFileStore
java.lang.Object
org.applecommander.change.ChangeRegistry<FileStore.FileStoreChangeEvent>
org.applecommander.archive.zip.ZipFileStore
- All Implemented Interfaces:
CapabilityProvider, ChangeSource<FileStore.FileStoreChangeEvent>, FileStore, Container, InformationProvider
public class ZipFileStore
extends ChangeRegistry<FileStore.FileStoreChangeEvent>
implements FileStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface FileStore
FileStore.ChangeType, FileStore.FileStoreChangeEvent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancan(Capability capability) Helps identify capabilities of the existing component.voidflush()Flush any pending writes back to the source.<T> Optional<T> Yields a list of columns to be used in this display mode.getLabel()The label is a mechanism to distinguish multiple file stores in a single file.This is the path separator character.All FileStores support a "root" directory that references all files.getType()Get the type of file store.Methods inherited from class ChangeRegistry
addChangeListener, notifyChangeListeners, removeChangeListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChangeSource
addChangeListener, removeChangeListener
-
Constructor Details
-
ZipFileStore
-
-
Method Details
-
getZipInputStream
- Throws:
IOException
-
getType
-
getLabel
Description copied from interface:FileStoreThe 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". -
getRootDirectory
Description copied from interface:FileStoreAll FileStores support a "root" directory that references all files.- Specified by:
getRootDirectoryin interfaceFileStore
-
getPathSeparator
Description copied from interface:FileStoreThis is the path separator character.- Specified by:
getPathSeparatorin interfaceFileStore
-
getDisplayColumns
Description copied from interface:FileStoreYields a list of columns to be used in this display mode.- Specified by:
getDisplayColumnsin interfaceFileStore
-
flush
public void flush()Description copied from interface:FileStoreFlush any pending writes back to the source. This is intended to handle archives as they do not have a fixed structure to write changes.
flushshould be invoked before a save.Example usage:
FileStore fileStore = fileStoreSelection.getSelectedItem(); fileStore.flush(); Source source = fileStore.get(Source.class).orElseThrow(); source.save(); -
can
Description copied from interface:CapabilityProviderHelps identify capabilities of the existing component.- Specified by:
canin interfaceCapabilityProvider
-
get
-
information
- Specified by:
informationin interfaceInformationProvider
-