1 38 39 40 package com.sun.xml.fastinfoset.tools; 41 42 import org.jvnet.fastinfoset.FastInfosetSource; 43 import java.io.InputStream ; 44 import java.io.OutputStream ; 45 import javax.xml.transform.Transformer ; 46 import javax.xml.transform.TransformerFactory ; 47 import javax.xml.transform.stream.StreamResult ; 48 49 public class FI_SAX_XML extends TransformInputOutput { 50 51 public FI_SAX_XML() { 52 } 53 54 public void parse(InputStream finf, OutputStream xml) throws Exception { 55 Transformer tx = TransformerFactory.newInstance().newTransformer(); 56 tx.transform(new FastInfosetSource(finf), new StreamResult (xml)); 57 } 58 59 public static void main(String [] args) throws Exception { 60 FI_SAX_XML p = new FI_SAX_XML(); 61 p.parse(args); 62 } 63 } 64 | Popular Tags |