Microsoft SDK for Java

XMLInputStream Class Constructors

The XMLInputStream class contains the following constructors:

XMLInputStream(InputStream in)

Constructs an XMLInputStream object from an InputStream. The first four bytes of the InputStream are read to determine the character encoding of the file. The XMLInputStream object does not ensure that the input stream follows the XML standard, and expects any non-UTF-8 file to begin with an <?XML> tag.

Syntax

public XMLInputStream(InputStream in);

Parameters

in The input stream to base the XMLInputStream object on.

XMLInputStream(URL url)

Constructs an XMLInputStream object from a URL object. Call this constructor to speed up Microsoft® Win32® input speed. The decoding is done by IXMLStream.

This constructor relies on the CXMLStream class in xmlurlstream.dll.

Syntax

public XMLInputStream(URL url) throws IOException;

Exception

IOException if xmlurlstream.dll or xmlurlstream.tlb is not properly registered on the system, or the encoding of the input stream cannot be handled.

Parameters

url The URL object to create the XMLInputStream object from.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.