Modifier and Type | Field and Description |
---|---|
private boolean | inString
Whether or not the parser is currently in the middle of a string literal. |
private boolean | quoted
Whether or not the last char has been a backslash. |
private int | readAheadCh
The read-ahead character, used for effectively pushing a single character back. |
Access | Constructor and Description |
---|---|
public | |
public | StripJavaComments(final Reader
A Reader object providing the underlying stream.
Must not be in)null .Creates a new filtered reader. |
Modifier and Type | Method and Description |
---|---|
public Reader | Returns: a new filter based on this configuration, but filtering the specified readerA Reader object providing the underlying stream.
Must not be rdr)null .Implements org. |
public int | Returns: the next character in the resulting stream, or -1 if the end of the resulting stream has been reachedOverrides java. |
inString | back to summary |
---|---|
private boolean inString Whether or not the parser is currently in the middle of a string literal. |
quoted | back to summary |
---|---|
private boolean quoted Whether or not the last char has been a backslash. |
readAheadCh | back to summary |
---|---|
private int readAheadCh The read-ahead character, used for effectively pushing a single character back. A value of -1 indicates that no character is in the buffer. |
StripJavaComments | back to summary |
---|---|
public StripJavaComments() Constructor for "dummy" instances.
|
StripJavaComments | back to summary |
---|---|
public StripJavaComments(final Reader in) Creates a new filtered reader.
|
chain | back to summary |
---|---|
public Reader chain(final Reader rdr) Implements org. Creates a new StripJavaComments using the passed in Reader for instantiation. |
read | back to summary |
---|---|
public int read() throws IOException Overrides java. Returns the next character in the filtered stream, not including Java comments.
|