Class XMLInputStream

public class XMLInputStream extends >InputStream
{
  // Fields
  public boolean caseInsensitive;

  // Constructors
  public XMLInputStream(URL url) throws IOException;
  public XMLInputStream(InputStream in);

  // Methods
  public void close() throws IOException;
  public XMLOutputStream createOutputStream( OutputStream out);
  public int read() throws IOException;
  public void setEncoding( String encoding ) throws IOException;
}

A Reader specifically for dealing with different encoding formats as well as liitleendian files.

>InputStream
  |
  +--XMLInputStream

Constructors

XMLInputStream

public XMLInputStream(URL url) throws IOException;

Builds the XMLInputStream. This constructor is intended to be called on Windows to speed up input speed. The decoding is done by IXMLStream Note: This constructor relies on CXMLStream class in xmlurlstream.dll. If xmlurlstream.dll or xmlurlstream.tlb is not properly registered on the system, or the encoding of the input stream cannot be handled, this constructor throws an IOException

XMLInputStream

public XMLInputStream(InputStream in);

Builds the XMLInputStream. Reads the first four bytes of the InputStream in order to make a guess as to the character encoding of the file. Assumes that the document is following the XML standard and that any non-UTF-8 file will begin with a tag.

Methods

close 

public void close() throws IOException;

Close the stream and release system resources.

createOutputStream 

public XMLOutputStream createOutputStream( OutputStream out);

Creates a new XMLOutputStream with the proper initial state. XMLOutputStreams should always be created through this method if the output stream is to mimic this input stream.

read 

public int read() throws IOException;

Returns the next unicode char in the stream. The read done depends on the current readState. POP states imply that there are characters that have been pushed onto the next[] stack.

setEncoding 

public void setEncoding( String encoding ) throws IOException;

Defines the character encoding of the stream. The new character encoding must agree with the encoding determined by the constructer. setEncoding is used to clarify between encodings that are not fully determinable through the first four bytes in a stream and not to change the encoding. This method must be called within 4096 reads() after construction.

Fields 

caseInsensitive
Whether the document to be parsed caseInsensitive. (if so, all names are folded to upper case). Default is 'false'.