Class ZipFileEntry
java.lang.Object
org.applecommander.archive.zip.ZipFileEntry
- All Implemented Interfaces:
FileEntry, WritableFileEntry, Container
-
Constructor Summary
ConstructorsConstructorDescriptionZipFileEntry(ZipFileStore fileStore, int entryNumber, ZipEntry entry) Create a ZipFileEntry that is backed by an existing Zip file and the specific entry involved.ZipFileEntry(ZipFileStore fileStore, String fileName) Create a new ZipFileEntry that does NOT exist in the zip file (yet). -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> longReturn the type of content, if known.longgetCrc()Return the file's data.Returns theFileStorethat thisEntryoriginates from.intgetName()Returns the name of this entry: either a directory name or a file name.The parentDirectory, if applicable.Interpret theFileEntryas if it were on a ProDOS volume.longgetSize()Returns the size, in bytes, of this item.booleanIndicates if thisFileEntryis deleted.voidsetComment(String comment) voidsetCreationTime(FileTime creationTime) voidsetDataFork(DataBuffer data) Store the file's data.voidsetLastAccessTime(FileTime lastAccessTime) voidsetLastModifiedTime(FileTime lastModifiedTime) voidAllows the name of this entry to be changed (depending on theCapabilityallowed by the underlyingFileStore).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FileEntry
getResourceForkMethods inherited from interface WritableFileEntry
setResourceFork
-
Constructor Details
-
ZipFileEntry
Create a ZipFileEntry that is backed by an existing Zip file and the specific entry involved. -
ZipFileEntry
Create a new ZipFileEntry that does NOT exist in the zip file (yet).
-
-
Method Details
-
getParent
-
isDeleted
-
getFileStore
Description copied from interface:FileEntryReturns theFileStorethat thisEntryoriginates from.- Specified by:
getFileStorein interfaceFileEntry
-
getName
Description copied from interface:FileEntryReturns the name of this entry: either a directory name or a file name. This does not contain any directory components -- strictly the name of this entry. Note that depending on context, this may be a computed field. -
setName
Description copied from interface:WritableFileEntryAllows the name of this entry to be changed (depending on theCapabilityallowed by the underlyingFileStore).- Specified by:
setNamein interfaceWritableFileEntry
-
getSize
-
getCreationTime
-
setCreationTime
-
getLastModifiedTime
-
setLastModifiedTime
-
getLastAccessTime
-
setLastAccessTime
-
getCrc
public long getCrc() -
getCompressedSize
public long getCompressedSize() -
getComment
-
setComment
-
getMethod
public int getMethod() -
getMethodName
-
getDataFork
Description copied from interface:FileEntryReturn the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
getDataForkin interfaceFileEntry
-
setDataFork
Description copied from interface:WritableFileEntryStore the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
setDataForkin interfaceWritableFileEntry
-
getProdosAttributes
Description copied from interface:FileEntryInterpret theFileEntryas if it were on a ProDOS volume. The intention is that ProDOS ended up being the common denominator in many tools and formats, so this allows each file store to manage the interpretation itself.- Specified by:
getProdosAttributesin interfaceFileEntry
-
getContentType
Description copied from interface:FileEntryReturn the type of content, if known. It should never return null; use UNKNOWN if not known.- Specified by:
getContentTypein interfaceFileEntry- See Also:
-
get
-