TextDatabase
Class WordReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.BufferedReader
          extended by TextDatabase.WordReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class WordReader
extends java.io.BufferedReader

The WordReader class reads words from a file


Field Summary
static int CapitalA
          Holds the capital A character
static int CapitalToSmallDistance
          Holds the distance betweeen small and capital characters
static int CapitalZ
          Holds the capital Z character
static int CarriageReturn
          Holds the carriage return character
static int EndOfFile
          Holds the End Of File character
static int LineFeed
          Holds the linefeed character
static int SmallA
          Holds the small A character
static int SmallZ
          Holds the small Z character
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
WordReader(java.lang.String FileName)
          Initializes the WordReader
 
Method Summary
 java.lang.String ReadWord()
          Reads a word by reading character after character, converting it to lower case.
 
Methods inherited from class java.io.BufferedReader
close, mark, markSupported, read, read, readLine, ready, reset, skip
 
Methods inherited from class java.io.Reader
read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LineFeed

public static final int LineFeed
Holds the linefeed character

See Also:
Constant Field Values

CarriageReturn

public static final int CarriageReturn
Holds the carriage return character

See Also:
Constant Field Values

CapitalA

public static final int CapitalA
Holds the capital A character

See Also:
Constant Field Values

CapitalZ

public static final int CapitalZ
Holds the capital Z character

See Also:
Constant Field Values

SmallA

public static final int SmallA
Holds the small A character

See Also:
Constant Field Values

SmallZ

public static final int SmallZ
Holds the small Z character

See Also:
Constant Field Values

CapitalToSmallDistance

public static final int CapitalToSmallDistance
Holds the distance betweeen small and capital characters

See Also:
Constant Field Values

EndOfFile

public static final int EndOfFile
Holds the End Of File character

See Also:
Constant Field Values
Constructor Detail

WordReader

public WordReader(java.lang.String FileName)
           throws java.io.FileNotFoundException
Initializes the WordReader

Throws:
java.io.FileNotFoundException
Method Detail

ReadWord

public java.lang.String ReadWord()
                          throws java.io.IOException
Reads a word by reading character after character, converting it to lower case. The process is finished when a word delimeter is reached. This function accepts only characters and ignores numbers.

Throws:
java.io.IOException