Top Description Fields Constructors Methods
org.apache.tools.ant.util

public Class LineTokenizer

extends ProjectComponent
implements Tokenizer
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.util.Tokenizer
Imports
java.io.IOException, .Reader, org.apache.tools.ant.ProjectComponent

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

Modifier and TypeField and Description
private boolean
private String
private static final int
private int
Inherited from org.apache.tools.ant.ProjectComponent:
descriptionlocationproject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the line ending character(s) for the current line
getPostToken
()

Implements org.apache.tools.ant.util.Tokenizer.getPostToken.

return the string between tokens, after the previous token.
public String

Returns:

the line excluding /r or /n, unless includedelims is set
getToken
(Reader
the input reader
in
)

Implements org.apache.tools.ant.util.Tokenizer.getToken.

get the next line from the input
public void
setIncludeDelims(boolean
if true include /r and /n in the line
includeDelims
)

attribute includedelims - whether to include the line ending with the line, or to return it in the posttoken default false

Inherited from org.apache.tools.ant.ProjectComponent:
clonegetDescriptiongetLocationgetProjectloglogsetDescriptionsetLocationsetProject

Field Detail

includeDelimsback to summary
private boolean includeDelims
lineEndback to summary
private String lineEnd
NOT_A_CHARback to summary
private static final int NOT_A_CHAR
pushedback to summary
private int pushed

Constructor Detail

LineTokenizerback to summary
public LineTokenizer()

Method Detail

getPostTokenback to summary
public String getPostToken()

Implements org.apache.tools.ant.util.Tokenizer.getPostToken.

Doc from org.apache.tools.ant.util.Tokenizer.getPostToken.

return the string between tokens, after the previous token.

Returns:String

the line ending character(s) for the current line

Annotations
@Override
getTokenback to summary
public String getToken(Reader in) throws IOException

Implements org.apache.tools.ant.util.Tokenizer.getToken.

get the next line from the input

Parameters
in:Reader

the input reader

Returns:String

the line excluding /r or /n, unless includedelims is set

Exceptions
IOException:
if an error occurs reading
setIncludeDelimsback to summary
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:boolean

if true include /r and /n in the line