jwrapper.jwutils
Class JWCrypt

java.lang.Object
  extended by jwrapper.jwutils.JWCrypt

public class JWCrypt
extends java.lang.Object

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

JWCrypt

public JWCrypt()
Method Detail

loadFile

public static byte[] loadFile(java.lang.String path)
                       throws java.io.IOException
Load a file from its relative path, decrypting it if JWCrypt has been used

Parameters:
path -
Returns:
Throws:
java.io.IOException

loadResource

public static byte[] loadResource(java.lang.String path)
                           throws java.io.IOException
Load a resource included in a JAR on the classpath, decrypting it if JWCrypt has been used

Parameters:
path - the path of the resource
Returns:
Throws:
java.io.IOException

loadResourceAsStream

public static java.io.InputStream loadResourceAsStream(java.lang.String path)
                                                throws java.io.IOException
Load a resource included in a JAR on the classpath, decrypting it if JWCrypt has been used

Parameters:
path - the path of the resource
Returns:
Throws:
java.io.IOException