< prev index next >

test/javax/xml/jaxp/unittest/dom/Bug6355326.java

Print this page




 101 
 102     private LSInput createLSInputEncoding() {
 103         LSInput src = implLS.createLSInput();
 104         Assert.assertFalse(src == null, "Could not create LSInput from DOMImplementationLS");
 105 
 106         try {
 107             src.setByteStream(new ByteArrayInputStream(encodingXML.getBytes("UTF-16")));
 108         } catch (UnsupportedEncodingException e) {
 109             e.printStackTrace();
 110             Assert.fail("Exception occured: " + e.getMessage());
 111         }
 112         return src;
 113     }
 114 
 115     private LSParser createLSParser() {
 116         LSParser p = implLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, "http://www.w3.org/2001/XMLSchema");
 117         Assert.assertFalse(p == null, "Could not create Synchronous LSParser from DOMImplementationLS");
 118         return p;
 119     }
 120 }
 121 


 101 
 102     private LSInput createLSInputEncoding() {
 103         LSInput src = implLS.createLSInput();
 104         Assert.assertFalse(src == null, "Could not create LSInput from DOMImplementationLS");
 105 
 106         try {
 107             src.setByteStream(new ByteArrayInputStream(encodingXML.getBytes("UTF-16")));
 108         } catch (UnsupportedEncodingException e) {
 109             e.printStackTrace();
 110             Assert.fail("Exception occured: " + e.getMessage());
 111         }
 112         return src;
 113     }
 114 
 115     private LSParser createLSParser() {
 116         LSParser p = implLS.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, "http://www.w3.org/2001/XMLSchema");
 117         Assert.assertFalse(p == null, "Could not create Synchronous LSParser from DOMImplementationLS");
 118         return p;
 119     }
 120 }

< prev index next >