|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.billpringle.utils.wrputils.WrpBuildZipCodes.ZipFileReader
class WrpBuildZipCodes.ZipFileReader
Class to read the input USPS City/State National zip code text file. This class reads the input zip code text file, which consists of fixed-length records without any end of line sequence. The actual format of this file is described in class WrpBuildZipCodes.
This class will read only the detailed zip code records.
Field Summary | |
---|---|
java.lang.String |
errMsg
the most recent error message |
protected java.io.FileReader |
rdr
input file reader |
Constructor Summary | |
---|---|
WrpBuildZipCodes.ZipFileReader()
Default constructor. |
|
WrpBuildZipCodes.ZipFileReader(java.io.File file)
Constructor with the input file object. |
|
WrpBuildZipCodes.ZipFileReader(java.lang.String fname)
Constructor with input file name. |
Method Summary | |
---|---|
void |
close()
Close the input file reader. |
java.lang.String |
getErrorMessage()
Return the latest error message (if any). |
boolean |
isOpen()
Test to see if the input file is currently open. |
WrpZipCode |
nextFileZip(java.io.FileReader rdr)
Read the next detailed zip code line from the raw input file. |
boolean |
openFile(java.lang.String fname)
Open the specified input text file. |
WrpZipCode |
readLine()
Read the next line from the input file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.FileReader rdr
public java.lang.String errMsg
Constructor Detail |
---|
public WrpBuildZipCodes.ZipFileReader()
public WrpBuildZipCodes.ZipFileReader(java.lang.String fname)
fname
- the name of the USPS input text filepublic WrpBuildZipCodes.ZipFileReader(java.io.File file)
file
- the input file object for the USPS text fileMethod Detail |
---|
public boolean openFile(java.lang.String fname)
fname
- the name of the USPS input City/State text file
public boolean isOpen()
public WrpZipCode readLine()
public WrpZipCode nextFileZip(java.io.FileReader rdr)
rdr
- a file reader opened to the raw citystate.txt input file
public java.lang.String getErrorMessage()
public void close() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |