📄 streamsource.html
字号:
<BR> Get the system identifier that was set with setSystemId.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/transform/stream/StreamSource.html#setInputStream(java.io.InputStream)">setInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> inputStream)</CODE><BR> Set the byte stream to be used as input. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/transform/stream/StreamSource.html#setPublicId(java.lang.String)">setPublicId</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> publicId)</CODE><BR> Set the public identifier for this Source. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/transform/stream/StreamSource.html#setReader(java.io.Reader)">setReader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A> reader)</CODE><BR> Set the input to be a character reader. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/transform/stream/StreamSource.html#setSystemId(java.io.File)">setSystemId</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> f)</CODE><BR> Set the system ID from a File reference.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/transform/stream/StreamSource.html#setSystemId(java.lang.String)">setSystemId</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> systemId)</CODE><BR> Set the system identifier for this Source. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="FEATURE"><!-- --></A><H3>FEATURE</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>FEATURE</B></PRE><DL><DD>If <A HREF="../../../../javax/xml/transform/TransformerFactory.html#getFeature(java.lang.String)"><CODE>TransformerFactory.getFeature(java.lang.String)</CODE></A> returns true when passed this value as an argument, the Transformer supports Source input of this type.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.xml.transform.stream.StreamSource.FEATURE">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="StreamSource()"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>()</PRE><DL><DD>Zero-argument default constructor. If this constructor is used, and no other method is called, the transformer will assume an empty input tree, with a default root node.<P></DL><HR><A NAME="StreamSource(java.io.InputStream)"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> inputStream)</PRE><DL><DD>Construct a StreamSource from a byte stream. Normally, a stream should be used rather than a reader, so the XML parser can resolve character encoding specified by the XML declaration. <p>If this constructor is used to process a stylesheet, normally setSystemId should also be called, so that relative URI references can be resolved.</p><P><DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - A valid InputStream reference to an XML stream.</DL><HR><A NAME="StreamSource(java.io.InputStream, java.lang.String)"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> inputStream, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> systemId)</PRE><DL><DD>Construct a StreamSource from a byte stream. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration. <p>This constructor allows the systemID to be set in addition to the input stream, which allows relative URIs to be processed.</p><P><DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - A valid InputStream reference to an XML stream.<DD><CODE>systemId</CODE> - Must be a String that conforms to the URI syntax.</DL><HR><A NAME="StreamSource(java.io.Reader)"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A> reader)</PRE><DL><DD>Construct a StreamSource from a character reader. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration. However, in many cases the encoding of the input stream is already resolved, as in the case of reading XML from a StringReader.<P><DT><B>Parameters:</B><DD><CODE>reader</CODE> - A valid Reader reference to an XML character stream.</DL><HR><A NAME="StreamSource(java.io.Reader, java.lang.String)"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A> reader, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> systemId)</PRE><DL><DD>Construct a StreamSource from a character reader. Normally, a stream should be used rather than a reader, so that the XML parser may resolve character encoding specified by the XML declaration. However, in many cases the encoding of the input stream is already resolved, as in the case of reading XML from a StringReader.<P><DT><B>Parameters:</B><DD><CODE>reader</CODE> - A valid Reader reference to an XML character stream.<DD><CODE>systemId</CODE> - Must be a String that conforms to the URI syntax.</DL><HR><A NAME="StreamSource(java.lang.String)"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> systemId)</PRE><DL><DD>Construct a StreamSource from a URL.<P><DT><B>Parameters:</B><DD><CODE>systemId</CODE> - Must be a String that conforms to the URI syntax.</DL><HR><A NAME="StreamSource(java.io.File)"><!-- --></A><H3>StreamSource</H3><PRE>public <B>StreamSource</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> f)</PRE><DL><DD>Construct a StreamSource from a File.<P><DT><B>Parameters:</B><DD><CODE>f</CODE> - Must a non-null File reference.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setInputStream(java.io.InputStream)"><!-- --></A><H3>setInputStream</H3><PRE>public void <B>setInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> inputStream)</PRE><DL><DD>Set the byte stream to be used as input. Normally, a stream should be used rather than a reader, so that the XML parser can resolve character encoding specified by the XML declaration. <p>If this Source object is used to process a stylesheet, normally setSystemId should also be called, so that relative URL references can be resolved.</p><P><DD><DL></DL></DD><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -