public void parse(InputStream is) throws IOException,
TransformerConfigurationException, SAXException {
byte[] buf = new byte[256];
int len = is.read(buf);
HL7Segment msh = HL7Segment.parseMSH(buf, buf.length);
String charsetName = HL7Charset.toCharsetName(msh.getField(17, charset));
Reader reader = new InputStreamReader(
new SequenceInputStream(
new ByteArrayInputStream(buf, 0, len), is),
charsetName);
TransformerHandler th = getTransformerHandler();