Class JarUtils


  • public class JarUtils
    extends java.lang.Object
    Since:
    0.1.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  JarUtils.IOFunction<T,​R>  
    • Constructor Summary

      Constructors 
      Constructor Description
      JarUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<java.util.jar.Manifest> getManifest​(java.util.jar.JarFile jarFile)  
      static BytecodeVersion readBytecodeVersion​(java.util.jar.JarFile jarFile, java.util.jar.JarEntry entry)  
      static <T> T withJarEntry​(java.util.jar.JarFile jarFile, java.util.jar.JarEntry entry, JarUtils.IOFunction<java.io.InputStream,​T> consumer)  
      • Methods inherited from class java.lang.Object

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

      • JarUtils

        public JarUtils()
    • Method Detail

      • getManifest

        public static java.util.Optional<java.util.jar.Manifest> getManifest​(java.util.jar.JarFile jarFile)
      • withJarEntry

        public static <T> T withJarEntry​(java.util.jar.JarFile jarFile,
                                         java.util.jar.JarEntry entry,
                                         JarUtils.IOFunction<java.io.InputStream,​T> consumer)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • readBytecodeVersion

        public static BytecodeVersion readBytecodeVersion​(java.util.jar.JarFile jarFile,
                                                          java.util.jar.JarEntry entry)