Enum HL7Charset

  • All Implemented Interfaces:
    Serializable, Comparable<HL7Charset>

    public enum HL7Charset
    extends Enum<HL7Charset>
    This enumerates the defined charsets for HL7 as defined in Table 0211, mapping them to the Java charset names and back
    • Method Detail

      • values

        public static HL7Charset[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (HL7Charset c : HL7Charset.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HL7Charset valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getHL7CharsetName

        public String getHL7CharsetName()
      • getJavaCharsetName

        public String getJavaCharsetName()
      • getHL7Charset

        public static HL7Charset getHL7Charset​(String s)
        Returns the HL7Charset that matches the parameter
        Parameters:
        s - charset string
        Returns:
        HL7Charset enum
      • getCharsetName

        public static String getCharsetName​(ca.uhn.hl7v2.model.Message message,
                                            org.apache.camel.Exchange exchange)
                                     throws ca.uhn.hl7v2.HL7Exception
        Returns the charset to be used for marshalling HL7 messages. If MSH-18 is empty, the charset configured in Camel's charset properties/headers is returned.
        Parameters:
        message - HL7 message
        exchange - Exchange
        Returns:
        Java charset name
        Throws:
        ca.uhn.hl7v2.HL7Exception