proguard
Class FileWordReader

java.lang.Object
  extended by proguard.WordReader
      extended by proguard.FileWordReader

public class FileWordReader
extends WordReader

A WordReader that returns words from a file or a URL.


Constructor Summary
FileWordReader(java.io.File file)
          Creates a new FileWordReader for the given file.
FileWordReader(java.net.URL url)
          Creates a new FileWordReader for the given URL.
 
Method Summary
 void close()
          Closes the FileWordReader.
protected  java.lang.String lineLocationDescription()
          Returns a readable description of the current WordReader position.
protected  java.lang.String nextLine()
          Reads a line from this WordReader, or from one of its active included WordReader objects.
 
Methods inherited from class proguard.WordReader
getBaseDir, includeWordReader, lastComments, locationDescription, nextWord, setBaseDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWordReader

public FileWordReader(java.io.File file)
               throws java.io.IOException
Creates a new FileWordReader for the given file.

Throws:
java.io.IOException

FileWordReader

public FileWordReader(java.net.URL url)
               throws java.io.IOException
Creates a new FileWordReader for the given URL.

Throws:
java.io.IOException
Method Detail

nextLine

protected java.lang.String nextLine()
                             throws java.io.IOException
Description copied from class: WordReader
Reads a line from this WordReader, or from one of its active included WordReader objects.

Specified by:
nextLine in class WordReader
Returns:
the read line.
Throws:
java.io.IOException

lineLocationDescription

protected java.lang.String lineLocationDescription()
Description copied from class: WordReader
Returns a readable description of the current WordReader position.

Specified by:
lineLocationDescription in class WordReader
Returns:
the description.

close

public void close()
           throws java.io.IOException
Description copied from class: WordReader
Closes the FileWordReader.

Overrides:
close in class WordReader
Throws:
java.io.IOException