|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
nl.gx.webmanager.handler.util.StreamingParser
public abstract class StreamingParser
Baseclass for LoggingFilterWriter. Provides functionality to filter a writer. It looks for a begin and end delimiter and calls the handle method when a pair is found. Subclasses must implement this handle method.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
StreamingParser(java.lang.String startDelimiter,
java.lang.String endDelimiter)
Constructs a StreamingParser. |
|
| Method Summary | |
|---|---|
protected abstract void |
characters(char[] values,
int from,
int to)
|
void |
close()
Close the stream, flushing it first. |
protected void |
finish()
|
void |
flush()
Flush the stream. |
protected abstract void |
handle(java.lang.String startTag,
java.lang.String value,
java.lang.String endTag)
|
static void |
main(java.lang.String[] args)
|
void |
write(char[] str,
int off,
int len)
Write a portion of an array of characters. |
void |
write(int c)
Write a single character. |
void |
write(java.lang.String str)
Write a string. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamingParser(java.lang.String startDelimiter,
java.lang.String endDelimiter)
startDelimiter - The start stringendDelimiter - The end string| Method Detail |
|---|
protected abstract void handle(java.lang.String startTag,
java.lang.String value,
java.lang.String endTag)
throws java.io.IOException
java.io.IOException
protected abstract void characters(char[] values,
int from,
int to)
throws java.io.IOException
java.io.IOException
public void write(int c)
throws java.io.IOException
write in class java.io.Writerc - int specifying a character to be written.
java.io.IOException - If an I/O error occurs
public void write(char[] str,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerstr - Array of charactersoff - Offset from which to start writing characterslen - Number of characters to write
java.io.IOException - If an I/O error occurs
public void write(java.lang.String str)
throws java.io.IOException
write in class java.io.Writerstr - String to be written
java.io.IOException - If an I/O error occurs
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOException - If an I/O error occurs
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Writerjava.io.IOException - If an I/O error occurs
protected void finish()
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||