Class ZipFileUtil


  • class ZipFileUtil
    extends java.lang.Object
    Mainly methods to lookup Zip* class constructors. This is needed because Java 6 doesn't have constructors with Charsets that were introduced in Java 7.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ZipFileUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.util.zip.ZipInputStream createZipInputStream​(java.io.InputStream inStream, java.nio.charset.Charset charset)
      Returns a ZipInputStream opened with a given charset.
      (package private) static java.util.zip.ZipOutputStream createZipOutputStream​(java.io.BufferedOutputStream outStream, java.nio.charset.Charset charset)
      Returns a ZipOutputStream opened with a given charset.
      (package private) static java.util.zip.ZipFile getZipFile​(java.io.File src, java.nio.charset.Charset charset)
      Returns a zipFile opened with a given charset
      (package private) static boolean isCharsetSupported()
      Returns true if charsets are supported in this JRE.
      • Methods inherited from class java.lang.Object

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

      • MISSING_METHOD_PLEASE_UPGRADE

        private static final java.lang.String MISSING_METHOD_PLEASE_UPGRADE
        See Also:
        Constant Field Values
      • CONSTRUCTOR_MESSAGE_FOR_ZIPFILE

        private static final java.lang.String CONSTRUCTOR_MESSAGE_FOR_ZIPFILE
        See Also:
        Constant Field Values
      • CONSTRUCTOR_MESSAGE_FOR_OUTPUT

        private static final java.lang.String CONSTRUCTOR_MESSAGE_FOR_OUTPUT
        See Also:
        Constant Field Values
      • CONSTRUCTOR_MESSAGE_FOR_INPUT

        private static final java.lang.String CONSTRUCTOR_MESSAGE_FOR_INPUT
        See Also:
        Constant Field Values
    • Constructor Detail

      • ZipFileUtil

        private ZipFileUtil()
    • Method Detail

      • createZipInputStream

        static java.util.zip.ZipInputStream createZipInputStream​(java.io.InputStream inStream,
                                                                 java.nio.charset.Charset charset)
        Returns a ZipInputStream opened with a given charset.
      • createZipOutputStream

        static java.util.zip.ZipOutputStream createZipOutputStream​(java.io.BufferedOutputStream outStream,
                                                                   java.nio.charset.Charset charset)
        Returns a ZipOutputStream opened with a given charset.
      • getZipFile

        static java.util.zip.ZipFile getZipFile​(java.io.File src,
                                                java.nio.charset.Charset charset)
                                         throws java.io.IOException
        Returns a zipFile opened with a given charset
        Throws:
        java.io.IOException
      • isCharsetSupported

        static boolean isCharsetSupported()
                                   throws java.io.IOException
        Returns true if charsets are supported in this JRE.
        Throws:
        java.io.IOException