org.codehaus.groovy.syntax.lexer
Class FileCharStream

java.lang.Object
  |
  +--org.codehaus.groovy.syntax.lexer.FileCharStream
All Implemented Interfaces:
CharStream

public class FileCharStream
extends Object
implements CharStream


Field Summary
 
Fields inherited from interface org.codehaus.groovy.syntax.lexer.CharStream
EOS
 
Constructor Summary
FileCharStream(File file)
           
 
Method Summary
 void close()
           
 char consume()
          Consume the next character.
protected  org.codehaus.groovy.syntax.lexer.CharStream getCharStream()
           
 String getDescription()
           
 File getFile()
           
 char la()
          Look-ahead to the next character.
 char la(int k)
          Look-ahead to the kth character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCharStream

public FileCharStream(File file)
Method Detail

getFile

public File getFile()

getCharStream

protected org.codehaus.groovy.syntax.lexer.CharStream getCharStream()
                                                             throws IOException
IOException

getDescription

public String getDescription()
Specified by:
getDescription in interface CharStream

la

public char la()
        throws IOException
Description copied from interface: CharStream
Look-ahead to the next character.

This method is equivalent to la(1).

Specified by:
la in interface CharStream
Returns:
The next character or -1 if no more characters available.
Throws:
IOException - If an error occurs attempting to lookahead a character.
See Also:
CharStream.la(int)

la

public char la(int k)
        throws IOException
Description copied from interface: CharStream
Look-ahead to the kth character.

Specified by:
la in interface CharStream
Parameters:
k - Number of characters to look ahead.
Returns:
the kth character or -1 if no more characters available.
Throws:
IOException - If an error occurs attempting to lookahead a character.

consume

public char consume()
             throws IOException
Description copied from interface: CharStream
Consume the next character.

Specified by:
consume in interface CharStream
Returns:
The consumed character or -1 if no more characters available.
Throws:
IOException - If an error occurs attempting to consume a character.

close

public void close()
           throws IOException
Specified by:
close in interface CharStream
IOException


Copyright © 2003 The Codehaus. All Rights Reserved.