Class LineTokenizer

  • All Implemented Interfaces:
    java.lang.Cloneable, Tokenizer

    public class LineTokenizer
    extends ProjectComponent
    implements Tokenizer
    class to tokenize the input as lines separated by \r (mac style), \r\n (dos/windows style) or \n (unix style)
    Ant 1.6
    • Constructor Detail

      • LineTokenizer

        public LineTokenizer()
    • Method Detail

      • 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
        includeDelims - if true include /r and /n in the line
      • getToken

        public java.lang.String getToken​( in)
        get the next line from the input
        Specified by:
        getToken in interface Tokenizer
        in - the input reader
        the line excluding /r or /n, unless includedelims is set
        Throws: - if an error occurs reading
      • getPostToken

        public java.lang.String getPostToken()
        Description copied from interface: Tokenizer
        return the string between tokens, after the previous token.
        Specified by:
        getPostToken in interface Tokenizer
        the line ending character(s) for the current line