org.apache.tools.ant.util

Class LineTokenizer

public class LineTokenizer extends ProjectComponent implements Tokenizer

class to tokenize the input as lines seperated by \r (mac style), \r\n (dos/windows style) or \n (unix style)

Since: Ant 1.6

Method Summary
StringgetPostToken()
StringgetToken(Reader in)
get the next line from the input
voidsetIncludeDelims(boolean includeDelims)
attribute includedelims - whether to include the line ending with the line, or to return it in the posttoken default false

Method Detail

getPostToken

public String getPostToken()

Returns: the line ending character(s) for the current line

getToken

public String getToken(Reader in)
get the next line from the input

Parameters: in the input reader

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

Throws: IOException if an error occurs reading

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