ca.uhn.hl7v2.parser
Class EncodingDetector

java.lang.Object
  extended by ca.uhn.hl7v2.parser.EncodingDetector

public class EncodingDetector
extends Object

Detects message encoding (ER7 / XML) without relying on any external dependencies


Method Summary
static boolean isEr7Encoded(String theMessage)
          Returns true if the message is ER7 (pipe-and-hat) encoded
static boolean isXmlEncoded(String theMessage)
          Returns true if the message is XML encoded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEr7Encoded

public static boolean isEr7Encoded(String theMessage)
Returns true if the message is ER7 (pipe-and-hat) encoded


isXmlEncoded

public static boolean isXmlEncoded(String theMessage)
Returns true if the message is XML encoded. Note that this message does not perform a very robust check, and does not validate for well-formedness. It is only intended to perform a simple check for XML vs. ER7 messages.



Copyright © 2001-2012 University Health Network. All Rights Reserved.