public abstract class CodeReaderFilter<O> extends Object
CodeReader,
CodeBufferTest#testCodeReaderFilter(),
CodeBufferTest#testSeveralCodeReaderFilter()| Constructor and Description |
|---|
CodeReaderFilter() |
CodeReaderFilter(O output) |
| Modifier and Type | Method and Description |
|---|---|
CodeReaderConfiguration |
getConfiguration()
Returns the configuration used for the CodeReader
|
O |
getOutput()
Returns the output object.
|
Reader |
getReader()
Returns the reader from which this class reads the character stream.
|
abstract int |
read(char[] filteredBuffer,
int offset,
int length)
This method implements the filtering logic, that is:
get the characters from the reader,
filter the character flow (and grab more characters from the reader if the filtering removes some),
and fill the given buffer to its full capacity with the filtered data.
|
void |
setConfiguration(CodeReaderConfiguration configuration)
Sets the configuration that must be used by the CodeReader
|
void |
setOutput(O output)
Sets the output object
|
void |
setReader(Reader reader)
Sets the reader from which this class will read the character stream.
|
public CodeReaderFilter()
public CodeReaderFilter(O output)
public Reader getReader()
public void setReader(Reader reader)
reader - the readerpublic void setOutput(O output)
output - the output to setpublic CodeReaderConfiguration getConfiguration()
public void setConfiguration(CodeReaderConfiguration configuration)
configuration - the configuration to setpublic abstract int read(char[] filteredBuffer, int offset, int length) throws IOException
filteredBuffer - the output buffer that must contain the filtered dataoffset - the offset to start reading from the readerlength - the number of characters to read from the readerIOException - If an I/O error occursCopyright © 2009-2014 SonarSource. All Rights Reserved.