Code example for StringReader

0
        return new String(chars);
    } 
 
    private XmlPullParser newPullParser(String xml) throws XmlPullParserException {
        XmlPullParser result = newPullParser();
        result.setInput(new StringReader(xml));
        return result;
    } 
 
    /** 
     * Creates a new pull parser. 
     */ 
    abstract XmlPullParser newPullParser() throws XmlPullParserException;
}