public void require(int type, String namespaceURI, String localName)
throws javax.xml.stream.XMLStreamException
{
if (type != _state) {
throw new XMLStreamException2("DOMStreamReader: Required event type not found");
}
if (namespaceURI != null && !namespaceURI.equals(getNamespaceURI())) {
throw new XMLStreamException2("DOMStreamReader: Required namespaceURI not found");
}
if (localName != null && !localName.equals(getLocalName())) {
throw new XMLStreamException2("DOMStreamReader: Required localName not found");
}
}