Class 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)  
      • Methods inherited from class java.lang.Object

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

      • ZipEntryReader

        public ZipEntryReader​(java.lang.String zipPath,
                              java.lang.String entryName)
    • Method Detail

      • getReader

        public java.io.Reader getReader​(java.nio.charset.Charset charset)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public java.lang.String read​(java.nio.charset.Charset charset)
                              throws java.io.IOException
        Throws:
        java.io.IOException