nl.gx.webmanager.handler.util
Class EscapingReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.FilterReader
          extended by nl.gx.webmanager.handler.util.EscapingReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class EscapingReader
extends java.io.FilterReader

This reader acts as a filter that escape the specified xml tags.


Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
EscapingReader(java.lang.String startDelimiter, java.lang.String endDelimiter, java.io.Reader origin, boolean decode)
          Constructs a ParserReader.
 
Method Summary
 int read(char[] cbuf, int off, int len)
          Reads from the original reader, processes the content and streams the avaible content into the cbuf array.
 
Methods inherited from class java.io.FilterReader
close, mark, markSupported, read, ready, reset, skip
 
Methods inherited from class java.io.Reader
read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscapingReader

public EscapingReader(java.lang.String startDelimiter,
                      java.lang.String endDelimiter,
                      java.io.Reader origin,
                      boolean decode)
Constructs a ParserReader.

Parameters:
startDelimiter - The start string
endDelimiter - The end string
Method Detail

read

public int read(char[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Reads from the original reader, processes the content and streams the avaible content into the cbuf array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

Overrides:
read in class java.io.FilterReader
Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - If an I/O error occurs


Copyright © 2007-2011 GX Software BV. All Rights Reserved.