Class TextBundle

    • Constructor Summary

      Constructors 
      Constructor Description
      TextBundle​(java.lang.String resource, java.lang.String id)
      Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
      TextBundle​(java.lang.String resource, java.lang.String id, java.lang.Object[] arguments)
      Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
      TextBundle​(java.lang.String resource, java.lang.String id, java.lang.String encoding)
      Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
      TextBundle​(java.lang.String resource, java.lang.String id, java.lang.String encoding, java.lang.Object[] arguments)
      Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
    • Field Detail

      • TEXT_ENTRY

        public static final java.lang.String TEXT_ENTRY
        text entry key
        See Also:
        Constant Field Values
    • Constructor Detail

      • TextBundle

        public TextBundle​(java.lang.String resource,
                          java.lang.String id)
                   throws java.lang.NullPointerException
        Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
        Parameters:
        resource - base name of the resource file
        id - the id of the corresponding bundle in the resource file
        Throws:
        java.lang.NullPointerException - if resource or id is null
      • TextBundle

        public TextBundle​(java.lang.String resource,
                          java.lang.String id,
                          java.lang.String encoding)
                   throws java.lang.NullPointerException,
                          java.io.UnsupportedEncodingException
        Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
        Parameters:
        resource - base name of the resource file
        id - the id of the corresponding bundle in the resource file
        encoding - the encoding of the resource file
        Throws:
        java.lang.NullPointerException - if resource or id is null
        java.io.UnsupportedEncodingException - if the encoding is not supported
      • TextBundle

        public TextBundle​(java.lang.String resource,
                          java.lang.String id,
                          java.lang.Object[] arguments)
                   throws java.lang.NullPointerException
        Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
        Parameters:
        resource - base name of the resource file
        id - the id of the corresponding bundle in the resource file
        arguments - an array containing the arguments for the message
        Throws:
        java.lang.NullPointerException - if resource or id is null
      • TextBundle

        public TextBundle​(java.lang.String resource,
                          java.lang.String id,
                          java.lang.String encoding,
                          java.lang.Object[] arguments)
                   throws java.lang.NullPointerException,
                          java.io.UnsupportedEncodingException
        Constructs a new TextBundle using resource as the base name for the RessourceBundle and id as the message bundle id the resource file.
        Parameters:
        resource - base name of the resource file
        id - the id of the corresponding bundle in the resource file
        encoding - the encoding of the resource file
        arguments - an array containing the arguments for the message
        Throws:
        java.lang.NullPointerException - if resource or id is null
        java.io.UnsupportedEncodingException - if the encoding is not supported
    • Method Detail

      • getText

        public java.lang.String getText​(java.util.Locale loc,
                                        java.util.TimeZone timezone)
                                 throws MissingEntryException
        Returns the text message in the given locale and timezone.
        Parameters:
        loc - the Locale
        timezone - the TimeZone
        Returns:
        the text message.
        Throws:
        MissingEntryException - if the message is not available
      • getText

        public java.lang.String getText​(java.util.Locale loc)
                                 throws MissingEntryException
        Returns the text message in the given locale and the defaut timezone.
        Parameters:
        loc - the Locale
        Returns:
        the text message.
        Throws:
        MissingEntryException - if the message is not available