|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.lwuit.util.Resources
public class Resources
Loads resources from the binary resource file generated during the build process. Please see Resource File Specification for details. A resource can be loaded entirely into memory, but other approaches are also possible. In case the resource is loaded entirely into memory, sufficient memory must be made available to accommodate the resource file.
Method Summary | |
---|---|
StaticAnimation |
getAnimation(String id)
Returns the animation resource from the file. |
String[] |
getAnimationResourceNames()
Returns the names of the animations within this bundle. |
InputStream |
getData(String id)
Returns the data resource from the file. |
String[] |
getDataResourceNames()
Returns the names of the data resources within this bundle. |
Font |
getFont(String id)
Returns the font resource from the file. |
String[] |
getFontResourceNames()
Returns the names of the fonts within this bundle. |
Image |
getImage(String id)
Returns the image resource from the file. |
String[] |
getImageResourceNames()
Returns the names of the images within this bundle. |
Hashtable |
getL10N(String id,
String locale)
Returns a hashmap containing localized String key/value pairs for the given locale name. |
String[] |
getL10NResourceNames()
Returns the names of the localization bundles within this bundle. |
String[] |
getResourceNames()
Returns the names of the resources within this bundle. |
Hashtable |
getTheme(String id)
Returns the theme resource from the file. |
String[] |
getThemeResourceNames()
Returns the names of the images within this bundle. |
boolean |
isAnimation(String name)
Returns true if this is an animation resource. |
boolean |
isData(String name)
Returns true if this is a data resource. |
boolean |
isFont(String name)
Returns true if this is a font resource. |
boolean |
isImage(String name)
Returns true if this is an image resource. |
boolean |
isL10N(String name)
Returns true if this is a locale resource. |
boolean |
isTheme(String name)
Returns true if this is a theme resource. |
static Resources |
open(InputStream resource)
Creates a resource object from the given input stream. |
static Resources |
open(String resource)
Creates a resource object from the local JAR resource identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String[] getResourceNames()
public String[] getDataResourceNames()
public String[] getL10NResourceNames()
public String[] getFontResourceNames()
public String[] getThemeResourceNames()
public String[] getImageResourceNames()
public String[] getAnimationResourceNames()
public boolean isL10N(String name)
name
- the name of the resource
NullPointerException
- if the resource doesn't existpublic boolean isTheme(String name)
name
- the name of the resource
NullPointerException
- if the resource doesn't existpublic boolean isFont(String name)
name
- the name of the resource
NullPointerException
- if the resource doesn't existpublic boolean isAnimation(String name)
name
- the name of the resource
NullPointerException
- if the resource doesn't existpublic boolean isData(String name)
name
- the name of the resource
NullPointerException
- if the resource doesn't existpublic boolean isImage(String name)
name
- the name of the resource
NullPointerException
- if the resource doesn't existpublic static Resources open(String resource) throws IOException
resource
- a local reference to a resource using the syntax of Class.getResourceAsStream(String)
IOException
- if opening/reading the resource failspublic static Resources open(InputStream resource) throws IOException
resource
- stream from which to read the resource
IOException
- if opening/reading the resource failspublic Image getImage(String id)
id
- name of the image resource
public StaticAnimation getAnimation(String id)
id
- name of the animation resource
public InputStream getData(String id)
id
- name of the data resource
public Hashtable getL10N(String id, String locale)
id
- name of the data resourcelocale
- name of the locale resource
public Font getFont(String id)
id
- name of the font resource
public Hashtable getTheme(String id)
id
- name of the theme resource
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |