public final class ZipFormat extends FormatBase
Represents ZIP format. See more: https://en.wikipedia.org/wiki/Zip_(file_format).
FormatBase
filePath, stream
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 ZIP metadata.
|
ZipFileInfo[] |
getFiles()
Gets the array of files and directories inside ZIP archive.
|
int |
getType()
Gets document type.
|
String |
getZipFileComment()
Gets the user's comment to the archive.
|
ZipMetadata |
getZipInfo()
Gets common ZIP information like total entries, user's comment.
|
void |
removeFileComment()
Removes user's file comment.
|
void |
setZipFileComment(String value)
Sets the user's comment to the archive.
|
close, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public ZipFormat(String fileName)
Initializes a new instance of the ZipFormat
class.
fileName
- Absolute path to the file.public ZipFormat(InputStream input)
Initializes a new instance of the ZipFormat
class.
input
- File stream.public int getType()
Gets document type.
getType
in class FormatBase
public final ZipMetadata getZipInfo()
Gets common ZIP information like total entries, user's comment.
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 zip file comment.public final ZipFileInfo[] getFiles()
Gets the array of files and directories inside ZIP archive.
public void cleanMetadata()
Removes ZIP metadata. Current version supports user's comment only. See more RemoveFileComment
.
cleanMetadata
in class FormatBase
public final void removeFileComment()
Removes user's file comment. The comment is related to the whole archive.
Copyright © 2018. All rights reserved.