|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.channel.CodeReaderFilter<OUTPUT> org.sonar.channel.ChannelCodeReaderFilter<OUTPUT>
public final class ChannelCodeReaderFilter<OUTPUT>
This class is a special CodeReaderFilter that uses Channels to filter the character stream before it is passed to the main channels declared for the CodeReader.
Constructor Summary | |
---|---|
ChannelCodeReaderFilter(Channel<OUTPUT>... channels)
Creates a CodeReaderFilter that will use the provided Channels to filter the character stream it gets from its reader. |
|
ChannelCodeReaderFilter(OUTPUT output,
Channel<OUTPUT>... channels)
Creates a CodeReaderFilter that will use the provided Channels to filter the character stream it gets from its reader. |
Method Summary | |
---|---|
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 |
setReader(Reader reader)
Sets the reader from which this class will read the character stream. |
Methods inherited from class org.sonar.channel.CodeReaderFilter |
---|
getConfiguration, getOutput, getReader, setConfiguration, setOutput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChannelCodeReaderFilter(Channel<OUTPUT>... channels)
channels
- the different channelspublic ChannelCodeReaderFilter(OUTPUT output, Channel<OUTPUT>... channels)
output
- the object that may accept tokenschannels
- the different channelsMethod Detail |
---|
public void setReader(Reader reader)
setReader
in class CodeReaderFilter<OUTPUT>
reader
- the readerpublic int read(char[] filteredBuffer, int offset, int length) throws IOException
read
in class CodeReaderFilter<OUTPUT>
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 reader
IOException
- If an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |