|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.Reader
com.sun.syndication.io.XmlReader
net.sourceforge.java.util.io.XmlProgressReader
XMLReader extension that is bindable to a
IProgressMonitor to report the progress of a xml read
operation.
| Field Summary | |
private int |
charactersRead
The number of characters read |
private IProgressMonitor |
monitor
The IProgressMonitor to report the reading status to
|
private int |
overallCharacters
The overall number of characters to be read |
| Fields inherited from class com.sun.syndication.io.XmlReader |
|
| Fields inherited from class java.io.Reader |
lock |
| Constructor Summary | |
XmlProgressReader(InputStream is,
boolean lenient,
IProgressMonitor monitor)
Creates a new XmlProgressReader which reads from the
specified InputStream and reports its reading progress to
the specified IProgressMonitor.
|
|
XmlProgressReader(InputStream is,
String httpContentType,
boolean lenient,
IProgressMonitor monitor)
Creates a new XmlProgressReader which reads from the
specified InputStream and reports its reading progress to
the specified IProgressMonitor.
|
|
XmlProgressReader(URLConnection conn,
IProgressMonitor monitor)
Creates a new XmlProgressReader which reads using the
specified URLConnection and reports its reading progress to
the specified IProgressMonitor.
|
|
XmlProgressReader(URL url,
IProgressMonitor monitor)
Creates a new XmlProgressReader which reads from the
specified URL and reports its reading progress to
the specified IProgressMonitor.
|
|
| Method Summary | |
void |
close()
Overrides XmlReader.close()
to close the progress monitor as well as the stream.
|
int |
read()
Overrides XmlReader.read()
to update the IProgressMonitor after the read.
|
int |
read(char[] buffer)
Overrides XmlReader.read(char[])
to update the IProgressMonitor after the read.
|
int |
read(char[] buffer,
int off,
int len)
Overrides XmlReader.read(char[], int, int)
to update the IProgressMonitor after the read.
|
long |
skip(long n)
Overrides XmlReader.skip
to update the progress monitor after the skip.
|
| Methods inherited from class com.sun.syndication.io.XmlReader |
getEncoding |
| Methods inherited from class java.io.Reader |
mark, markSupported, ready, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private IProgressMonitor monitor
The IProgressMonitor to report the reading status to
private int charactersRead
The number of characters read
private int overallCharacters
The overall number of characters to be read
| Constructor Detail |
public XmlProgressReader(InputStream is,
boolean lenient,
IProgressMonitor monitor)
throws IOException,
XmlReaderException
Creates a new XmlProgressReader which reads from the
specified InputStream and reports its reading progress to
the specified IProgressMonitor.
is - InputStream to create a Reader fromlenient - indicates if the charset encoding detection should be
relaxedmonitor - the IProgressMonitor to report the reading
progress to
IOException - if an io error occured while setting up this
XmlProgressReader
XmlReaderException - thrown if the charset encoding could not be
determined according to the specs.
public XmlProgressReader(InputStream is,
String httpContentType,
boolean lenient,
IProgressMonitor monitor)
throws IOException,
XmlReaderException
Creates a new XmlProgressReader which reads from the
specified InputStream and reports its reading progress to
the specified IProgressMonitor.
is - InputStream to create the Reader fromhttpContentType - content-type header to use for the resolution of
the charset encodinglenient - indicates if the charset encoding detection should be
relaxedmonitor - the IProgressMonitor to report the reading
progress to
IOException - thrown if there is a problem reading the file.
XmlReaderException - thrown if the charset encoding could not be
determined according to the specs.
public XmlProgressReader(URL url,
IProgressMonitor monitor)
throws IOException
Creates a new XmlProgressReader which reads from the
specified URL and reports its reading progress to
the specified IProgressMonitor.
url - the URL to read frommonitor - the IProgressMonitor to report the
reading progress to
IOException - if an io error occured while setting up this
XmlProgressReader
public XmlProgressReader(URLConnection conn,
IProgressMonitor monitor)
throws IOException
Creates a new XmlProgressReader which reads using the
specified URLConnection and reports its reading progress to
the specified IProgressMonitor.
conn - the URLConnection to use for readingmonitor - the IProgressMonitor to report the
reading progress to
IOException - if an io error occured while setting up this
XmlProgressReader| Method Detail |
public int read()
throws IOException
Overrides XmlReader.read()
to update the IProgressMonitor after the read.
IOException - if an io error occured during the read operation
public int read(char[] buffer)
throws IOException
Overrides XmlReader.read(char[])
to update the IProgressMonitor after the read.
buffer - the buffer to read into
IOException - if an io error occured during the read operation
public int read(char[] buffer,
int off,
int len)
throws IOException
Overrides XmlReader.read(char[], int, int)
to update the IProgressMonitor after the read.
buffer - the buffer to read intooff - the offset at which to start storing characterslen - the maximum number of characters to read
IOException - if an io error occured during the read operation
public long skip(long n)
throws IOException
Overrides XmlReader.skip
to update the progress monitor after the skip.
n - the number of characters to skip
IllegalArgumentException - If n is negative.
IOException - if an io error occured during the skip operation
public void close()
throws IOException
Overrides XmlReader.close()
to close the progress monitor as well as the stream.
IOException - if an io error occured during the close operation
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||