| Modifier and Type | Method and Description |
|---|---|
static void |
adjustEntryTime(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)
If environment-variable SOURCE_DATE_EPOCH is set, we use "0" for the
time of the entry.
|
static org.apache.commons.compress.archivers.zip.ZipArchiveEntry |
getCorePropertiesZipEntry(ZipPackage pkg)
Retrieve the zip entry of the core properties part.
|
static String |
getOPCNameFromZipItemName(String zipItemName)
Convert a zip name into an OPC name by adding a leading forward slash to
the specified item name.
|
static String |
getZipItemNameFromOPCName(String opcItemName)
Convert an OPC item name into a zip item name by removing any leading
forward slash if it exist.
|
static URI |
getZipURIFromOPCName(String opcItemName)
Convert an OPC item name into a zip URI by removing any leading forward
slash if it exist.
|
static ZipSecureFile |
openZipFile(File file)
Opens the specified file as a secure zip, or returns null if no
such file exists
|
static ZipSecureFile |
openZipFile(String path)
Retrieve and open as a secure zip file with the specified path.
|
static ZipArchiveThresholdInputStream |
openZipStream(InputStream stream)
Opens the specified stream as a secure zip.
|
static ZipArchiveThresholdInputStream |
openZipStream(InputStream stream,
boolean closeStream)
Opens the specified stream as a secure zip.
|
public static org.apache.commons.compress.archivers.zip.ZipArchiveEntry getCorePropertiesZipEntry(ZipPackage pkg)
IllegalArgumentException - If the relationship for
core properties cannot be read or an invalid name is
specified in the properties.public static String getOPCNameFromZipItemName(String zipItemName)
zipItemName - Zip item name to convert.public static String getZipItemNameFromOPCName(String opcItemName)
opcItemName - The OPC item name to convert.public static URI getZipURIFromOPCName(String opcItemName)
opcItemName - The OPC item name to convert.public static ZipArchiveThresholdInputStream openZipStream(InputStream stream) throws IOException
stream - The stream to open.IOExceptionpublic static ZipArchiveThresholdInputStream openZipStream(InputStream stream, boolean closeStream) throws IOException
stream - The stream to open.closeStream - whether to close the streamIOExceptionpublic static ZipSecureFile openZipFile(File file) throws IOException, NotOfficeXmlFileException
file - The file to open.IOException - if the zip file cannot be opened or closed to read the header signatureNotOfficeXmlFileException - if stream does not start with zip header signaturepublic static ZipSecureFile openZipFile(String path) throws IOException
path - The file path.IOExceptionpublic static void adjustEntryTime(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)
entry - The zip-entry to adjust