Enum Class HL7Charset

java.lang.Object
java.lang.Enum<HL7Charset>
org.apache.camel.component.hl7.HL7Charset
All Implemented Interfaces:
Serializable, Comparable<HL7Charset>, Constable

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
  • Enum Constant Details

    • ISO_8859_1

      public static final HL7Charset ISO_8859_1
    • ISO_8859_2

      public static final HL7Charset ISO_8859_2
    • ISO_8859_3

      public static final HL7Charset ISO_8859_3
    • ISO_8859_4

      public static final HL7Charset ISO_8859_4
    • ISO_8859_5

      public static final HL7Charset ISO_8859_5
    • ISO_8859_6

      public static final HL7Charset ISO_8859_6
    • ISO_8859_7

      public static final HL7Charset ISO_8859_7
    • ISO_8859_8

      public static final HL7Charset ISO_8859_8
    • ISO_8859_9

      public static final HL7Charset ISO_8859_9
    • ASCII

      public static final HL7Charset ASCII
    • BIG_5

      public static final HL7Charset BIG_5
    • CNS

      public static final HL7Charset CNS
    • GB_1830_2000

      public static final HL7Charset GB_1830_2000
    • ISO_IR14

      public static final HL7Charset ISO_IR14
    • ISO_IR159

      public static final HL7Charset ISO_IR159
    • ISO_IR87

      public static final HL7Charset ISO_IR87
    • KS_X_1001

      public static final HL7Charset KS_X_1001
    • UNICODE

      public static final HL7Charset UNICODE
    • UTF_16

      public static final HL7Charset UTF_16
    • UTF_32

      public static final HL7Charset UTF_32
    • UTF_8

      public static final HL7Charset UTF_8
  • Method Details

    • values

      public static HL7Charset[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HL7Charset valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
    • getCharsetName

      public static String getCharsetName(byte[] bytes, String guessedCharsetName) throws UnsupportedEncodingException, ca.uhn.hl7v2.HL7Exception
      Returns the charset to be used for unmarshalling HL7 messages. If MSH-18 is empty, the temporary charset name is returned.
      Parameters:
      bytes - HL7 message as byte array
      guessedCharsetName - the temporary charset guessed to be able to read MSH-18
      Returns:
      Java charset name
      Throws:
      UnsupportedEncodingException
      ca.uhn.hl7v2.HL7Exception
      See Also: