Package org.zeroturnaround.zip
Class ZipFileUtil
- java.lang.Object
-
- org.zeroturnaround.zip.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.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CONSTRUCTOR_MESSAGE_FOR_INPUT
private static java.lang.String
CONSTRUCTOR_MESSAGE_FOR_OUTPUT
private static java.lang.String
CONSTRUCTOR_MESSAGE_FOR_ZIPFILE
private static java.lang.String
MISSING_METHOD_PLEASE_UPGRADE
-
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()
Returnstrue
if 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.IOException
Returns a zipFile opened with a given charset- Throws:
java.io.IOException
-
isCharsetSupported
static boolean isCharsetSupported() throws java.io.IOException
Returnstrue
if charsets are supported in this JRE.- Throws:
java.io.IOException
-
-