Code example for StringReader

Methods: close

0
 
        int sizeAfter = getNamespaceResolverSize(desc);
 
        assertEquals(sizeBefore, sizeAfter);
 
        StringReader reader = new StringReader(writer.toString());
        InputSource inputSource = new InputSource(reader);
        Document testDocument = parser.parse(inputSource);
        writer.close();
        reader.close();
 
        objectToXMLDocumentTest(testDocument);
    } 
 
    public void testValidatingMarshal() throws Exception { 
        StringWriter writer = new StringWriter();
        Object objectToWrite = getWriteControlObject();
        XMLDescriptor desc = null;
        if (objectToWrite instanceof XMLRoot) {
            XMLRoot xmlRoot = (XMLRoot) objectToWrite;
            if(null != xmlRoot.getObject()) {