public final class ZipFormat extends FormatBase
Represents a ZIP archive.
Constructor and Description |
---|
ZipFormat(InputStream input)
Initializes a new instance of the
ZipFormat class. |
ZipFormat(String fileName)
Initializes a new instance of the
ZipFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes writable metadata properties associated with the file.
|
ZipFileInfo[] |
getFiles()
Gets an array that contains information about the archived files and directories.
|
int |
getType()
Gets the type of the loaded file.
|
String |
getZipFileComment()
Gets the user's comment to the archive.
|
ZipMetadata |
getZipInfo()
Gets the metadata extracted from the ZIP file.
|
void |
removeFileComment()
Removes the user's file comment.
|
void |
setZipFileComment(String value)
Sets the user's comment to the archive.
|
close, dispose, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public ZipFormat(String fileName)
Initializes a new instance of the ZipFormat
class.
fileName
- A string that contains the full name of the file from which to create a ZipFormat
instance.public ZipFormat(InputStream input)
Initializes a new instance of the ZipFormat
class.
input
- A stream that contains the data for this ZipFormat
.public int getType()
Gets the type of the loaded file.
getType
in class FormatBase
public final ZipMetadata getZipInfo()
Gets the metadata extracted from the ZIP file.
public final String getZipFileComment()
Gets the user's comment to the archive.
public final void setZipFileComment(String value)
Sets the user's comment to the archive.
value
- The user's comment to the archive.public final ZipFileInfo[] getFiles()
Gets an array that contains information about the archived files and directories.
public void cleanMetadata()
Removes writable metadata properties associated with the file. Currently, only the archive file comment is cleaned.
cleanMetadata
in class FormatBase
public final void removeFileComment()
Removes the user's file comment. The comment is related to the whole archive.
Copyright © 2019. All rights reserved.