Package com.google.javascript.jscomp
Class ZipEntryReader
- java.lang.Object
-
- com.google.javascript.jscomp.ZipEntryReader
-
- All Implemented Interfaces:
java.io.Serializable
@GwtIncompatible("java.util.zip.ZipFile") public final class ZipEntryReader extends java.lang.Object implements java.io.Serializable
A class that abstract entries from zip files via managed caching.Normally zip files created via URL connection cache indefinite by JDK. That's not good since a zip file contents might change over time (e.g. compiler running as a worker). This class provides a timestamp controlled caching which ensures we always read up-to-date zip while avoiding wasting time by re-reading the zip for each entry.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ZipEntryReader(java.lang.String zipPath, java.lang.String entryName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Reader
getReader(java.nio.charset.Charset charset)
java.lang.String
read(java.nio.charset.Charset charset)
-