@Override
    public void mark(int readAheadLimit) throws IOException {
      if (readAheadLimit < 0) {
        throw new IllegalArgumentException("Read-ahead limit < 0");
      }
      ensureOpen();
      mark = next;
    }
Check to make sure that the stream has not been closed
ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java