private void ensureOpen() throws IOException {
      if (str == null)
        throw new IOException("Stream closed");
    }
Check to make sure that the stream has not been closed
ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java