Code example for StringReader

Methods: close

0
			// -- get result of initial parsing - DTD document with parameter 
			// -- entity references expanded 
			String intermedResult = initialParser.Input();
 
			// -- construct StringReader from the intermediate result of parsing 
			StringReader strReader = new StringReader(intermedResult);
 
			// -- instantiate char stream for main parser 
			charStream = new InputCharStream(strReader);
 
			// -- instantiate main parser 
			DTDParser parser = new DTDParser(charStream);
 
			// -- parse intermediate result by the main parser 
			// -- and get corresponding DTD document oblect 
			DTDdocument dtd = parser.Input();
 
			strReader.close();
 
			// -- return DTD document object 
			return dtd;
		} catch (TokenMgrError tme) {
			String msg = tme.getMessage();