Class ZipBrowserOracle
java.lang.Object
com.pnfsoftware.jeb.util.encoding.zip.ZipBrowserOracle
- All Implemented Interfaces:
IGenericZipBrowser
,AutoCloseable
An implementation of a Zip browser that uses the standard JDK implementation.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
Charset used (in descending priority order) byZipBrowserOracle(File, Charset)
-
Constructor Summary
ConstructorDescriptionOpen a zip archive and attempt to auto-detect character encoding for entry names.ZipBrowserOracle
(File f, Charset charset) Open a zip archive and force the use of a given charset for entry names. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Map<String,
GenericZipEntry<?>> getEntryStream
(String name) byte[]
-
Field Details
-
csnamesTrylist
Charset used (in descending priority order) byZipBrowserOracle(File, Charset)
-
-
Constructor Details
-
ZipBrowserOracle
Open a zip archive and attempt to auto-detect character encoding for entry names. (Currently, only the entries incsnamesTrylist
are tried).- Parameters:
f
-- Throws:
IOException
-
ZipBrowserOracle
Open a zip archive and force the use of a given charset for entry names.- Parameters:
f
-charset
-- Throws:
IOException
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIGenericZipBrowser
- Throws:
IOException
-
getEntries
- Specified by:
getEntries
in interfaceIGenericZipBrowser
-
getEntry
- Specified by:
getEntry
in interfaceIGenericZipBrowser
-
readEntry
- Specified by:
readEntry
in interfaceIGenericZipBrowser
- Throws:
IOException
-
getEntryStream
- Specified by:
getEntryStream
in interfaceIGenericZipBrowser
- Throws:
IOException
-