Class ICUData


  • public final class ICUData
    extends Object
    Provides access to ICU data files as InputStreams. Implements security checking.
    • 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
    • Constructor Detail

      • ICUData

        public ICUData()
    • Method Detail

      • exists

        public static boolean exists​(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