|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Reader
net.n3.nanoxml.ContentReader
class ContentReader
This reader reads data from another reader until a new element has been encountered.
| Field Summary | |
|---|---|
private java.lang.String |
buffer
Buffer. |
private int |
bufferIndex
Pointer into the buffer. |
private IXMLReader |
reader
The encapsulated reader. |
private IXMLEntityResolver |
resolver
The entity resolver. |
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
ContentReader(IXMLReader reader,
IXMLEntityResolver resolver,
java.lang.String buffer)
Creates the reader. |
|
| Method Summary | |
|---|---|
void |
close()
Skips remaining data and closes the stream. |
protected void |
finalize()
Cleans up the object when it's destroyed. |
int |
read(char[] outputBuffer,
int offset,
int size)
Reads a block of data. |
| Methods inherited from class java.io.Reader |
|---|
mark, markSupported, read, read, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private IXMLReader reader
private java.lang.String buffer
private int bufferIndex
private IXMLEntityResolver resolver
| Constructor Detail |
|---|
ContentReader(IXMLReader reader,
IXMLEntityResolver resolver,
java.lang.String buffer)
reader - the encapsulated readerresolver - the entity resolverbuffer - data that has already been read from reader| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public int read(char[] outputBuffer,
int offset,
int size)
throws java.io.IOException
read in class java.io.ReaderoutputBuffer - where to put the read dataoffset - first position in buffer to put the datasize - maximum number of chars to read
java.io.IOException - if an error occurred reading the data
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Readerjava.io.IOException - if an error occurred reading the data
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||