Class ResourceExtractor


  • public class ResourceExtractor
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.File extractResourcePath​(java.lang.Class<?> cl, java.lang.String resourcePath, java.io.File dest)  
      static java.io.File extractResourcePath​(java.lang.Class<?> cl, java.lang.String resourcePath, java.io.File tempDir, boolean alwaysExtract)  
      static java.io.File extractResourcePath​(java.lang.String resourcePath, java.io.File dest)  
      private static void extractResourcePathFromJar​(java.lang.Class<?> cl, java.io.File jarFile, java.lang.String resourcePath, java.io.File dest)  
      static java.io.File extractResourceToDestination​(java.lang.Class<?> cl, java.lang.String resourcePath, java.io.File destination, boolean alwaysExtract)  
      private static java.io.File getJarFileFromUrl​(java.net.URL url)  
      static java.io.File simpleExtractResources​(java.lang.Class<?> cl, java.lang.String resourcePath)  
      • Methods inherited from class java.lang.Object

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

      • ResourceExtractor

        public ResourceExtractor()
    • Method Detail

      • simpleExtractResources

        public static java.io.File simpleExtractResources​(java.lang.Class<?> cl,
                                                          java.lang.String resourcePath)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • extractResourcePath

        public static java.io.File extractResourcePath​(java.lang.String resourcePath,
                                                       java.io.File dest)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • extractResourcePath

        public static java.io.File extractResourcePath​(java.lang.Class<?> cl,
                                                       java.lang.String resourcePath,
                                                       java.io.File dest)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • extractResourcePath

        public static java.io.File extractResourcePath​(java.lang.Class<?> cl,
                                                       java.lang.String resourcePath,
                                                       java.io.File tempDir,
                                                       boolean alwaysExtract)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • extractResourceToDestination

        public static java.io.File extractResourceToDestination​(java.lang.Class<?> cl,
                                                                java.lang.String resourcePath,
                                                                java.io.File destination,
                                                                boolean alwaysExtract)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • extractResourcePathFromJar

        private static void extractResourcePathFromJar​(java.lang.Class<?> cl,
                                                       java.io.File jarFile,
                                                       java.lang.String resourcePath,
                                                       java.io.File dest)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getJarFileFromUrl

        private static java.io.File getJarFileFromUrl​(java.net.URL url)