Sdílet prostřednictvím


StreamSource Constructors

Definition

Overloads

StreamSource()

Zero-argument default constructor.

StreamSource(File)

Construct a StreamSource from a File.

StreamSource(Reader)

Construct a StreamSource from a character reader.

StreamSource(Stream)

Construct a StreamSource from a byte stream.

StreamSource(String)

Construct a StreamSource from a URL.

StreamSource(Reader, String)

Construct a StreamSource from a character reader.

StreamSource(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

StreamSource(Stream, String)

Construct a StreamSource from a byte stream.

StreamSource()

Zero-argument default constructor.

[Android.Runtime.Register(".ctor", "()V", "")]
public StreamSource ();
Attributes

Remarks

Zero-argument default constructor. If this constructor is used, and no Stream source is set using #setInputStream(java.io.InputStream inputStream) or #setReader(java.io.Reader reader), then the Transformer will create an empty source java.io.InputStream using java.io.InputStream#InputStream() new InputStream().

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

  • <xref:Javax.Xml.Transform.Transformer.Transform(Javax.Xml.Transform.ISource%2c+Javax.Xml.Transform.IResult)>

Applies to

StreamSource(File)

Construct a StreamSource from a File.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;)V", "")]
public StreamSource (Java.IO.File? f);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;)V", "")>]
new Javax.Xml.Transform.Stream.StreamSource : Java.IO.File -> Javax.Xml.Transform.Stream.StreamSource

Parameters

f
File

Must a non-null File reference.

Attributes

Remarks

Construct a StreamSource from a File.

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource(java.io.File).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StreamSource(Reader)

Construct a StreamSource from a character reader.

[Android.Runtime.Register(".ctor", "(Ljava/io/Reader;)V", "")]
public StreamSource (Java.IO.Reader? reader);
[<Android.Runtime.Register(".ctor", "(Ljava/io/Reader;)V", "")>]
new Javax.Xml.Transform.Stream.StreamSource : Java.IO.Reader -> Javax.Xml.Transform.Stream.StreamSource

Parameters

reader
Reader

A valid Reader reference to an XML character stream.

Attributes

Remarks

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.

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource(java.io.Reader).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StreamSource(Stream)

Construct a StreamSource from a byte stream.

[Android.Runtime.Register(".ctor", "(Ljava/io/InputStream;)V", "")]
public StreamSource (System.IO.Stream? inputStream);
[<Android.Runtime.Register(".ctor", "(Ljava/io/InputStream;)V", "")>]
new Javax.Xml.Transform.Stream.StreamSource : System.IO.Stream -> Javax.Xml.Transform.Stream.StreamSource

Parameters

inputStream
Stream

A valid InputStream reference to an XML stream.

Attributes

Remarks

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.

If this constructor is used to process a stylesheet, normally setSystemId should also be called, so that relative URI references can be resolved.

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource(java.io.InputStream).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StreamSource(String)

Construct a StreamSource from a URL.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public StreamSource (string? systemId);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Javax.Xml.Transform.Stream.StreamSource : string -> Javax.Xml.Transform.Stream.StreamSource

Parameters

systemId
String

Must be a String that conforms to the URI syntax.

Attributes

Remarks

Construct a StreamSource from a URL.

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StreamSource(Reader, String)

Construct a StreamSource from a character reader.

[Android.Runtime.Register(".ctor", "(Ljava/io/Reader;Ljava/lang/String;)V", "")]
public StreamSource (Java.IO.Reader? reader, string? systemId);
[<Android.Runtime.Register(".ctor", "(Ljava/io/Reader;Ljava/lang/String;)V", "")>]
new Javax.Xml.Transform.Stream.StreamSource : Java.IO.Reader * string -> Javax.Xml.Transform.Stream.StreamSource

Parameters

reader
Reader

A valid Reader reference to an XML character stream.

systemId
String

Must be a String that conforms to the URI syntax.

Attributes

Remarks

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.

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource(java.io.Reader, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StreamSource(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected StreamSource (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Javax.Xml.Transform.Stream.StreamSource : nativeint * Android.Runtime.JniHandleOwnership -> Javax.Xml.Transform.Stream.StreamSource

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StreamSource(Stream, String)

Construct a StreamSource from a byte stream.

[Android.Runtime.Register(".ctor", "(Ljava/io/InputStream;Ljava/lang/String;)V", "")]
public StreamSource (System.IO.Stream? inputStream, string? systemId);
[<Android.Runtime.Register(".ctor", "(Ljava/io/InputStream;Ljava/lang/String;)V", "")>]
new Javax.Xml.Transform.Stream.StreamSource : System.IO.Stream * string -> Javax.Xml.Transform.Stream.StreamSource

Parameters

inputStream
Stream

A valid InputStream reference to an XML stream.

systemId
String

Must be a String that conforms to the URI syntax.

Attributes

Remarks

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.

This constructor allows the systemID to be set in addition to the input stream, which allows relative URIs to be processed.

Java documentation for javax.xml.transform.stream.StreamSource.StreamSource(java.io.InputStream, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to