| |
|
| org.apache.tools.ant.filters.BaseFilterReader org.apache.tools.ant.filters.TokenFilter
All known Subclasses: org.apache.tools.ant.types.optional.ScriptFilter,
Inner Class :public interface Filter | |
Inner Class :public static class ReplaceString extends ChainableReaderFilter | |
Inner Class :public static class ContainsString extends ProjectComponent implements Filter | |
Inner Class :public static class ReplaceRegex extends ChainableReaderFilter | |
Inner Class :public static class ContainsRegex extends ChainableReaderFilter | |
Inner Class :public static class Trim extends ChainableReaderFilter | |
Inner Class :public static class IgnoreBlank extends ChainableReaderFilter | |
TokenFilter | public TokenFilter(Reader in)(Code) | | Creates a new filtered reader.
Parameters: in - A Reader object providing the underlying stream.Must not be null . |
add | public void add(Tokenizer tokenizer)(Code) | | add an arbitrary tokenizer
Parameters: tokenizer - the tokenizer to all, only one allowed |
add | public void add(Filter filter)(Code) | | Add an arbitrary filter
Parameters: filter - the filter to add |
addContainsRegex | public void addContainsRegex(ContainsRegex filter)(Code) | | contains regex filter
Parameters: filter - the contains regex filter |
addContainsString | public void addContainsString(ContainsString filter)(Code) | | contains string filter
Parameters: filter - the contains string filter |
addDeleteCharacters | public void addDeleteCharacters(DeleteCharacters filter)(Code) | | delete chars
Parameters: filter - the delete characters filter |
addFileTokenizer | public void addFileTokenizer(FileTokenizer tokenizer)(Code) | | add a file tokenizer
Parameters: tokenizer - the file tokenizer |
addIgnoreBlank | public void addIgnoreBlank(IgnoreBlank filter)(Code) | | ignore blank filter
Parameters: filter - the ignore blank filter |
addLineTokenizer | public void addLineTokenizer(LineTokenizer tokenizer)(Code) | | add a line tokenizer - this is the default.
Parameters: tokenizer - the line tokenizer |
addReplaceRegex | public void addReplaceRegex(ReplaceRegex filter)(Code) | | replace regex filter
Parameters: filter - the replace regex filter |
addReplaceString | public void addReplaceString(ReplaceString filter)(Code) | | replace string filter
Parameters: filter - the replace string filter |
addStringTokenizer | public void addStringTokenizer(StringTokenizer tokenizer)(Code) | | add a string tokenizer
Parameters: tokenizer - the string tokenizer |
addTrim | public void addTrim(Trim filter)(Code) | | trim filter
Parameters: filter - the trim filter |
chain | final public Reader chain(Reader reader)(Code) | | Creates a new TokenFilter using the passed in
Reader for instantiation.
Parameters: reader - A Reader object providing the underlying stream. a new filter based on this configuration |
convertRegexOptions | public static int convertRegexOptions(String flags)(Code) | | convert regex option flag characters to regex options
g - Regexp.REPLACE_ALL
i - Regexp.MATCH_CASE_INSENSITIVE
m - Regexp.MATCH_MULTILINE
s - Regexp.MATCH_SINGLELINE
Parameters: flags - the string containing the flags the Regexp option bits |
read | public int read() throws IOException(Code) | | Returns the next character in the filtered stream, only including
lines from the original stream which match all of the specified
regular expressions.
the next character in the resulting stream, or -1if the end of the resulting stream has been reached exception: IOException - if the underlying stream throws an IOExceptionduring reading |
resolveBackSlash | public static String resolveBackSlash(String input)(Code) | | xml does not do "c" like interpretation of strings.
i.e. \n\r\t etc.
this method processes \n, \r, \t, \f, \\
also subs \s -> " \n\r\t\f"
a trailing '\' will be ignored
Parameters: input - raw string with possible embedded '\'s converted string |
setDelimOutput | public void setDelimOutput(String delimOutput)(Code) | | set the output delimiter.
Parameters: delimOutput - replaces the delim string returned by thetokenizer, if present. |
|
|
|