Documentation of 'org.apache.poi.openxml4j.opc.internal.ZipHelper' Java class
ZipHelper
org.apache.poi.openxml4j.opc.internal

Class ZipHelper



  • public final class ZipHelper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • READ_WRITE_FILE_BUFFER_SIZE

        public static final int READ_WRITE_FILE_BUFFER_SIZE
        Buffer to read data from file. Use big buffer to improve performaces. the InputStream class is reading only 8192 bytes per read call (default value set by sun)
        See Also:
        Constant Field Values
    • Method Detail

      • getCorePropertiesZipEntry

        public static java.util.zip.ZipEntry getCorePropertiesZipEntry(ZipPackage pkg)
        Retrieve the zip entry of the core properties part.
        Throws:
        OpenXML4JException - Throws if internal error occurs.
      • getContentTypeZipEntry

        public static java.util.zip.ZipEntry getContentTypeZipEntry(ZipPackage pkg)
        Retrieve the Zip entry of the content types part.
      • getOPCNameFromZipItemName

        public 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.
        Parameters:
        zipItemName - Zip item name to convert.
        Returns:
        An OPC compliant name.
      • getZipItemNameFromOPCName

        public 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.
        Parameters:
        opcItemName - The OPC item name to convert.
        Returns:
        A zip item name without any leading slashes.
      • getZipURIFromOPCName

        public 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.
        Parameters:
        opcItemName - The OPC item name to convert.
        Returns:
        A zip URI without any leading slashes.
      • openZipFile

        public static java.util.zip.ZipFile openZipFile(java.io.File file)
                                                 throws java.io.IOException
        Opens the specified file as a zip, or returns null if no such file exists
        Parameters:
        file - The file to open.
        Returns:
        The zip archive freshly open.
        Throws:
        java.io.IOException
      • openZipFile

        public static java.util.zip.ZipFile openZipFile(java.lang.String path)
                                                 throws java.io.IOException
        Retrieve and open a zip file with the specified path.
        Parameters:
        path - The file path.
        Returns:
        The zip archive freshly open.
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.