Package pro.gravit.utils.helper
Class JarHelper
java.lang.Object
pro.gravit.utils.helper.JarHelper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]getClassBytes(Class<?> clazz)static byte[]getClassBytes(Class<?> clazz, ClassLoader classLoader)static InputStreamgetClassBytesStream(Class<?> clazz)static InputStreamgetClassBytesStream(Class<?> clazz, ClassLoader classLoader)static StringgetClassFile(Class<?> clazz)static StringgetClassFile(String classname)static byte[]getClassFromJar(String name, Path file)static voidstatic voidjarMap(ZipInputStream input, boolean overwrite)static voidjarMap(ZipInputStream input, Map<String,String> map, boolean overwrite)static voidjarWalk(ZipInputStream input, JarHelper.JarWalkCallback callback)static voidzipWalk(ZipInputStream input, JarHelper.ZipWalkCallback callback)
-
Constructor Details
-
JarHelper
public JarHelper()
-
-
Method Details
-
zipWalk
public static void zipWalk(ZipInputStream input, JarHelper.ZipWalkCallback callback) throws IOException- Throws:
IOException
-
jarWalk
public static void jarWalk(ZipInputStream input, JarHelper.JarWalkCallback callback) throws IOException- Throws:
IOException
-
jarMap
public static Map<String,String> jarMap(ZipInputStream input, boolean overwrite) throws IOException- Throws:
IOException
-
jarMap
public static void jarMap(ZipInputStream input, Map<String,String> map, boolean overwrite) throws IOException- Throws:
IOException
-
jarMap
- Throws:
IOException
-
jarMap
public static void jarMap(Path file, Map<String,String> map, boolean overwrite) throws IOException- Throws:
IOException
-
jarMap
- Throws:
IOException
-
jarMap
public static void jarMap(Class<?> clazz, Map<String,String> map, boolean overwrite) throws IOException- Throws:
IOException
-
getClassFile
-
getClassFile
-
getClassBytes
- Throws:
IOException
-
getClassBytes
- Throws:
IOException
-
getClassBytesStream
- Throws:
IOException
-
getClassBytesStream
public static InputStream getClassBytesStream(Class<?> clazz, ClassLoader classLoader) throws IOException- Throws:
IOException
-
getClassFromJar
- Throws:
IOException
-