com.bluecast.xml

Class XMLReaderReader


public final class XMLReaderReader
extends XMLInputReader

A Reader for XML documents and streams. This class prepares a Reader source for XML processing by converting CR/LF patterns to LF and by checking for illegal XML characters.
Version:
$Revision: 1.5 $
Author:
Yuval Oren, yuval@bluecast.com

Constructor Summary

XMLReaderReader()
Create an XMLReaderReader without providing an input Reader yet.
XMLReaderReader(Reader in)
Creates an XMLReaderReader and resets the reader position after reading the XML declaration.
XMLReaderReader(Reader in, boolean rewindDeclaration)
Creates an XMLReaderReader.

Method Summary

void
close()
void
mark(int readAheadLimit)
boolean
markSupported()
int
read()
int
read(char[] destbuf)
int
read(char[] destbuf, int off, int len)
boolean
ready()
void
reset()
void
reset(Reader in, boolean rewindDeclaration)
long
skip(long n)

Methods inherited from class com.bluecast.xml.XMLInputReader

getXMLDeclaredEncoding, getXMLVersion, isXMLStandalone, isXMLStandaloneDeclared, parseXMLDeclaration, resetInput

Constructor Details

XMLReaderReader

public XMLReaderReader()
Create an XMLReaderReader without providing an input Reader yet. You must call reset() before using.

XMLReaderReader

public XMLReaderReader(Reader in)
            throws IOException
Creates an XMLReaderReader and resets the reader position after reading the XML declaration.
Parameters:
in - the input source

XMLReaderReader

public XMLReaderReader(Reader in,
                       boolean rewindDeclaration)
            throws IOException
Creates an XMLReaderReader.
Parameters:
in - the input source
rewindDeclaration - a value of false will skip past any XML declaration. True will dish out the entire document.

Method Details

close

public void close()
            throws IOException

mark

public void mark(int readAheadLimit)
            throws IOException

markSupported

public boolean markSupported()

read

public int read()
            throws IOException

read

public int read(char[] destbuf)
            throws IOException

read

public int read(char[] destbuf,
                int off,
                int len)
            throws IOException

ready

public boolean ready()
            throws IOException

reset

public void reset()
            throws IOException

reset

public void reset(Reader in,
                  boolean rewindDeclaration)
            throws IOException

skip

public long skip(long n)
            throws IOException