Package org.apache.tools.ant.util
Class LineTokenizer
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.util.LineTokenizer
class to tokenize the input as lines separated
by \r (mac style), \r\n (dos/windows style) or \n (unix style)
- Since:
- Ant 1.6
-
Field Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturn the string between tokens, after the previous token.get the next line from the inputvoidsetIncludeDelims(boolean includeDelims) attribute includedelims - whether to include the line ending with the line, or to return it in the posttoken default falseMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
LineTokenizer
public LineTokenizer()
-
-
Method Details
-
setIncludeDelims
public void setIncludeDelims(boolean includeDelims) attribute includedelims - whether to include the line ending with the line, or to return it in the posttoken default false- Parameters:
includeDelims- if true include /r and /n in the line
-
getToken
get the next line from the input- Specified by:
getTokenin interfaceTokenizer- Parameters:
in- the input reader- Returns:
- the line excluding /r or /n, unless includedelims is set
- Throws:
IOException- if an error occurs reading
-
getPostToken
Description copied from interface:Tokenizerreturn the string between tokens, after the previous token.- Specified by:
getPostTokenin interfaceTokenizer- Returns:
- the line ending character(s) for the current line
-