Package com.ibm.icu.impl
Class ICUData
- java.lang.Object
-
- com.ibm.icu.impl.ICUData
-
public final class ICUData extends Object
Provides access to ICU data files as InputStreams. Implements security checking.
-
-
Field Summary
Fields Modifier and Type Field Description static StringICU_BASE_NAMEThe base name of ICU data to be used with ClassLoader.getResourceAsStream(), ICUResourceBundle.getBundleInstance() etc.static StringICU_BRKITR_BASE_NAMEThe base name of rbbi data to be used with getBundleInstance APIstatic StringICU_BRKITR_NAMEThe base name of rbbi data to be used with getData APIstatic StringICU_BUNDLEThe data path to be used with Class.getResourceAsStream().static StringICU_COLLATION_BASE_NAMEThe base name of collation data to be used with getBundleInstance APIstatic StringICU_CURR_BASE_NAMEstatic StringICU_LANG_BASE_NAMEstatic StringICU_RBNF_BASE_NAMEThe base name of rbnf data to be used with getBundleInstance APIstatic StringICU_REGION_BASE_NAMEstatic StringICU_TRANSLIT_BASE_NAMEThe base name of transliterator data to be used with getBundleInstance APIstatic StringICU_UNIT_BASE_NAMEstatic StringICU_ZONE_BASE_NAME
-
Constructor Summary
Constructors Constructor Description ICUData()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanexists(String resourceName)static InputStreamgetRequiredStream(Class<?> root, String resourceName)Convenience method that calls getStream(root, resourceName, true).static InputStreamgetRequiredStream(ClassLoader loader, String resourceName)static InputStreamgetRequiredStream(String resourceName)Convenience method that calls getStream(ICUData.class, resourceName, true).static InputStreamgetStream(Class<?> root, String resourceName)Convenience override that calls getStream(root, resourceName, false); Returns null if the resource could not be found.static InputStreamgetStream(ClassLoader loader, String resourceName)static InputStreamgetStream(String resourceName)Convenience override that calls getStream(ICUData.class, resourceName, false); Returns null if the resource could not be found.
-
-
-
Field Detail
-
ICU_BUNDLE
public static final String ICU_BUNDLE
The data path to be used with Class.getResourceAsStream().- See Also:
- Constant Field Values
-
ICU_BASE_NAME
public static final String ICU_BASE_NAME
The base name of ICU data to be used with ClassLoader.getResourceAsStream(), ICUResourceBundle.getBundleInstance() etc.- See Also:
- Constant Field Values
-
ICU_COLLATION_BASE_NAME
public static final String ICU_COLLATION_BASE_NAME
The base name of collation data to be used with getBundleInstance API- See Also:
- Constant Field Values
-
ICU_BRKITR_NAME
public static final String ICU_BRKITR_NAME
The base name of rbbi data to be used with getData API- See Also:
- Constant Field Values
-
ICU_BRKITR_BASE_NAME
public static final String ICU_BRKITR_BASE_NAME
The base name of rbbi data to be used with getBundleInstance API- See Also:
- Constant Field Values
-
ICU_RBNF_BASE_NAME
public static final String ICU_RBNF_BASE_NAME
The base name of rbnf data to be used with getBundleInstance API- See Also:
- Constant Field Values
-
ICU_TRANSLIT_BASE_NAME
public static final String ICU_TRANSLIT_BASE_NAME
The base name of transliterator data to be used with getBundleInstance API- See Also:
- Constant Field Values
-
ICU_LANG_BASE_NAME
public static final String ICU_LANG_BASE_NAME
- See Also:
- Constant Field Values
-
ICU_CURR_BASE_NAME
public static final String ICU_CURR_BASE_NAME
- See Also:
- Constant Field Values
-
ICU_REGION_BASE_NAME
public static final String ICU_REGION_BASE_NAME
- See Also:
- Constant Field Values
-
ICU_ZONE_BASE_NAME
public static final String ICU_ZONE_BASE_NAME
- See Also:
- Constant Field Values
-
ICU_UNIT_BASE_NAME
public static final String ICU_UNIT_BASE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
exists
public static boolean exists(String resourceName)
-
getStream
public static InputStream getStream(ClassLoader loader, String resourceName)
-
getRequiredStream
public static InputStream getRequiredStream(ClassLoader loader, String resourceName)
-
getStream
public static InputStream getStream(String resourceName)
Convenience override that calls getStream(ICUData.class, resourceName, false); Returns null if the resource could not be found.
-
getRequiredStream
public static InputStream getRequiredStream(String resourceName)
Convenience method that calls getStream(ICUData.class, resourceName, true).- Throws:
MissingResourceException- if the resource could not be found
-
getStream
public static InputStream getStream(Class<?> root, String resourceName)
Convenience override that calls getStream(root, resourceName, false); Returns null if the resource could not be found.
-
getRequiredStream
public static InputStream getRequiredStream(Class<?> root, String resourceName)
Convenience method that calls getStream(root, resourceName, true).- Throws:
MissingResourceException- if the resource could not be found
-
-