java.lang.Object jwrapper.jwutils.JWCrypt
public class JWCrypt
Utility method for loading encrypted resources and files. Note that using the standard methods for loading resources inside JARs on the classpath (e.g. Class.getResourceAsStream) will automatically decrypt encrypted resources. Methods in this class can be used when running an app outside of JWrapper and they will load files/resources without decrypting them. Included in build 00024346154 and later
Constructor Summary | |
---|---|
JWCrypt()
|
Method Summary | |
---|---|
static byte[] |
loadFile(java.lang.String path)
Load a file from its relative path, decrypting it if JWCrypt has been used |
static byte[] |
loadResource(java.lang.String path)
Load a resource included in a JAR on the classpath, decrypting it if JWCrypt has been used |
static java.io.InputStream |
loadResourceAsStream(java.lang.String path)
Load a resource included in a JAR on the classpath, decrypting it if JWCrypt has been used |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JWCrypt()
Method Detail |
---|
public static byte[] loadFile(java.lang.String path) throws java.io.IOException
path
-
java.io.IOException
public static byte[] loadResource(java.lang.String path) throws java.io.IOException
path
- the path of the resource
java.io.IOException
public static java.io.InputStream loadResourceAsStream(java.lang.String path) throws java.io.IOException
path
- the path of the resource
java.io.IOException