org.apache.abdera.i18n.text.io
Class FilteredCharReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.FilterReader
          extended by org.apache.abdera.i18n.text.io.FilteredCharReader
All Implemented Interfaces:
Closeable, Readable

public class FilteredCharReader
extends FilterReader

A reader implementation that filters out unwanted characters By default, unwanted characters are simply removed from the stream. Alternatively, a replacement character can be provided so long as it is acceptable to the specified filter


Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
FilteredCharReader(InputStream in, Filter filter)
           
FilteredCharReader(InputStream in, Filter filter, char replacement)
           
FilteredCharReader(InputStream in, String charset, Filter filter)
           
FilteredCharReader(InputStream in, String charset, Filter filter, char replacement)
           
FilteredCharReader(Reader in)
           
FilteredCharReader(Reader in, char replacement)
           
FilteredCharReader(Reader in, Filter filter)
           
FilteredCharReader(Reader in, Filter filter, char replacement)
           
 
Method Summary
static Filter getUnacceptableFilter(int... unacceptable)
           
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 
Methods inherited from class java.io.FilterReader
close, mark, markSupported, 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

FilteredCharReader

public FilteredCharReader(InputStream in,
                          Filter filter)

FilteredCharReader

public FilteredCharReader(InputStream in,
                          String charset,
                          Filter filter)
                   throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

FilteredCharReader

public FilteredCharReader(InputStream in,
                          Filter filter,
                          char replacement)

FilteredCharReader

public FilteredCharReader(InputStream in,
                          String charset,
                          Filter filter,
                          char replacement)
                   throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

FilteredCharReader

public FilteredCharReader(Reader in)

FilteredCharReader

public FilteredCharReader(Reader in,
                          Filter filter)

FilteredCharReader

public FilteredCharReader(Reader in,
                          char replacement)

FilteredCharReader

public FilteredCharReader(Reader in,
                          Filter filter,
                          char replacement)
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class FilterReader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterReader
Throws:
IOException

getUnacceptableFilter

public static Filter getUnacceptableFilter(int... unacceptable)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.