Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.envoisolutions.sxc.xpath.impl;
 
 
 
public abstract class AbstractXPathEvaluator implements XPathEvaluator {
    protected final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
    public void evaluate(InputStream streamthrows Exception {
        if (stream == null) {
            throw new NullPointerException("InputStream cannot be null!");
        }
        final XMLStreamReader reader = .createXMLStreamReader(stream);
        evaluate(reader);
        reader.close();
    }
    public void evaluate(Source resourceAsSourcethrows Exception {
        if (resourceAsSource == null) {
            throw new NullPointerException("Source cannot be null!");
        }
        final XMLStreamReader reader = .createXMLStreamReader(resourceAsSource);
        evaluate(reader);
        reader.close();
    }
New to GrepCode? Check out our FAQ X