public final class ZipHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
READ_WRITE_FILE_BUFFER_SIZE
Buffer to read data from file.
|
Modifier and Type | Method and Description |
---|---|
static java.util.zip.ZipEntry |
getContentTypeZipEntry(ZipPackage pkg)
Retrieve the Zip entry of the content types part.
|
static java.util.zip.ZipEntry |
getCorePropertiesZipEntry(ZipPackage pkg)
Retrieve the zip entry of the core properties part.
|
static java.lang.String |
getOPCNameFromZipItemName(java.lang.String zipItemName)
Convert a zip name into an OPC name by adding a leading forward slash to
the specified item name.
|
static java.lang.String |
getZipItemNameFromOPCName(java.lang.String opcItemName)
Convert an OPC item name into a zip item name by removing any leading
forward slash if it exist.
|
static java.net.URI |
getZipURIFromOPCName(java.lang.String opcItemName)
Convert an OPC item name into a zip URI by removing any leading forward
slash if it exist.
|
static java.util.zip.ZipFile |
openZipFile(java.io.File file)
Opens the specified file as a zip, or returns null if no such file exists
|
static java.util.zip.ZipFile |
openZipFile(java.lang.String path)
Retrieve and open a zip file with the specified path.
|
public static final int READ_WRITE_FILE_BUFFER_SIZE
public static java.util.zip.ZipEntry getCorePropertiesZipEntry(ZipPackage pkg)
OpenXML4JException
- Throws if internal error occurs.public static java.util.zip.ZipEntry getContentTypeZipEntry(ZipPackage pkg)
public static java.lang.String getOPCNameFromZipItemName(java.lang.String zipItemName)
zipItemName
- Zip item name to convert.public static java.lang.String getZipItemNameFromOPCName(java.lang.String opcItemName)
opcItemName
- The OPC item name to convert.public static java.net.URI getZipURIFromOPCName(java.lang.String opcItemName)
opcItemName
- The OPC item name to convert.public static java.util.zip.ZipFile openZipFile(java.io.File file) throws java.io.IOException
file
- The file to open.java.io.IOException
public static java.util.zip.ZipFile openZipFile(java.lang.String path) throws java.io.IOException
path
- The file path.java.io.IOException
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.