jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java Thu Jul 28 16:44:02 2016 +0000
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/parser/XMLInputSource.java Thu Jul 28 22:58:41 2016 -0700
@@ -21,9 +21,9 @@
package com.sun.org.apache.xerces.internal.xni.parser;
import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
-
import java.io.InputStream;
import java.io.Reader;
+import org.xml.sax.InputSource;
/**
* This class represents an input source for an XML document. The
@@ -108,6 +108,23 @@
} // <init>(XMLResourceIdentifier)
/**
+ * Constructs an input source from a SAX InputSource
+ * object.
+ *
+ * @param inputSource a SAX InputSource
+ * @param isCreatedByResolver a flag to indicate whether the source is
+ * created by a resolver
+ */
+ public XMLInputSource(InputSource inputSource, boolean isCreatedByResolver) {
+ fPublicId = inputSource.getPublicId();
+ fSystemId = inputSource.getSystemId();
+ fByteStream = inputSource.getByteStream();
+ fCharStream = inputSource.getCharacterStream();
+ fEncoding = inputSource.getEncoding();
+ fIsCreatedByResolver = isCreatedByResolver;
+ }
+
+ /**
* Constructs an input source from a byte stream.
*
* @param publicId The public identifier, if known.