org.robolectric.res.TextCollectingNodeHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources Show documentation
Show all versions of resources Show documentation
An alternative Android testing framework.
package org.robolectric.res;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
public class TextCollectingNodeHandler extends NodeHandler {
private final StringBuilder buf;
public TextCollectingNodeHandler(StringBuilder buf) {
this.buf = buf;
}
@Override
public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException {
buf.append(xml.getText());
}
@Override
NodeHandler findMatchFor(XMLStreamReader xml) {
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy