Package org.zeroturnaround.zip
Class ZipFileUtil
- java.lang.Object
-
- org.zeroturnaround.zip.ZipFileUtil
-
class ZipFileUtil extends java.lang.ObjectMainly methods to lookup Zip* class constructors. This is needed because Java 6 doesn't have constructors with Charsets that were introduced in Java 7.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCONSTRUCTOR_MESSAGE_FOR_INPUTprivate static java.lang.StringCONSTRUCTOR_MESSAGE_FOR_OUTPUTprivate static java.lang.StringCONSTRUCTOR_MESSAGE_FOR_ZIPFILEprivate static java.lang.StringMISSING_METHOD_PLEASE_UPGRADE
-
Constructor Summary
Constructors Modifier Constructor Description privateZipFileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.util.zip.ZipInputStreamcreateZipInputStream(java.io.InputStream inStream, java.nio.charset.Charset charset)Returns a ZipInputStream opened with a given charset.(package private) static java.util.zip.ZipOutputStreamcreateZipOutputStream(java.io.BufferedOutputStream outStream, java.nio.charset.Charset charset)Returns a ZipOutputStream opened with a given charset.(package private) static java.util.zip.ZipFilegetZipFile(java.io.File src, java.nio.charset.Charset charset)Returns a zipFile opened with a given charset(package private) static booleanisCharsetSupported()Returnstrueif charsets are supported in this JRE.
-
-
-
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
-
-
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.IOExceptionReturns a zipFile opened with a given charset- Throws:
java.io.IOException
-
isCharsetSupported
static boolean isCharsetSupported() throws java.io.IOExceptionReturnstrueif charsets are supported in this JRE.- Throws:
java.io.IOException
-
-