| java.lang.Object com.sun.midp.util.ResourceHandler
ResourceHandler | public class ResourceHandler (Code) | | The ResourceHandler class is a system level utility class.
Its purpose is to return system resources as an array of bytes
based on a unique String identifier. All methods in this utility
class should be protected through use of the SecurityToken.
|
Method Summary | |
public static byte[] | getAmsResource(SecurityToken token, String resource) Load a resource from the system and return it as a byte array.
This method is used to load AMS icons.
Parameters: token - the SecurityToken to use to grant permission toexecute this method. Parameters: resource - a String identifier which can uniquely describethe location of the resource to be loaded. | public static byte[] | getSystemImageResource(SecurityToken token, String imageName) Load a system image resource from the system and return it as
a byte array. | public static byte[] | getSystemResource(SecurityToken token, String resource) Load a resource from the system and return it as a byte array.
This method is used to load system level resources, such as
images, sounds, properties, etc.
Parameters: token - the SecurityToken to use to grant permission toexecute this method. Parameters: resource - a String identifier which can uniquely describethe location of the resource to be loaded. |
getAmsResource | public static byte[] getAmsResource(SecurityToken token, String resource)(Code) | | Load a resource from the system and return it as a byte array.
This method is used to load AMS icons.
Parameters: token - the SecurityToken to use to grant permission toexecute this method. Parameters: resource - a String identifier which can uniquely describethe location of the resource to be loaded. a byte[] containing the resource retrieved from thesystem. null if the resource could not be found. |
getSystemImageResource | public static byte[] getSystemImageResource(SecurityToken token, String imageName)(Code) | | Load a system image resource from the system and return it as
a byte array. The images are stored in the configuration
directory ($MIDP_HOME/lib).
Parameters: token - the SecurityToken to use to grant permission toexecute this method. Parameters: imageName - name of the image a byte[] containing the resource retrieved from thesystem. null if the resource could not be found. throws: IllegalArgumentException - if imageName contains a "/" or "\\",or imageName is null or imageName is empty |
getSystemResource | public static byte[] getSystemResource(SecurityToken token, String resource)(Code) | | Load a resource from the system and return it as a byte array.
This method is used to load system level resources, such as
images, sounds, properties, etc.
Parameters: token - the SecurityToken to use to grant permission toexecute this method. Parameters: resource - a String identifier which can uniquely describethe location of the resource to be loaded. a byte[] containing the resource retrieved from thesystem. null if the resource could not be found. |
|
|