Class Fields0
java.lang.Object
|
+----Fields0
- public class Fields0
- extends Object
Demonstrate the ability to scan a file, find a part of the file
and extract and store unique fields from the file. Also shows
documentation in javadoc form.
- Author:
- David G. Green
-
Fields0()
-
-
findField(String)
- try to find a field in the list of known fields
-
getLine()
- get a line from the input stream
-
main(String[])
- main program
-
printFields()
- print out the known fields
-
seekStartOfRecord()
- seek the start of a record in the input stream
-
updateFields()
- read the current record, extract the field, and update the list
of known fields
Fields0
public Fields0()
main
public static void main(String args[]) throws IOException
- main program
seekStartOfRecord
public static boolean seekStartOfRecord() throws IOException
- seek the start of a record in the input stream
- Returns:
- s whether or not start of record is found
getLine
public static String getLine() throws IOException
- get a line from the input stream
updateFields
public static void updateFields() throws IOException
- read the current record, extract the field, and update the list
of known fields
printFields
public static void printFields()
- print out the known fields
findField
public static int findField(String fld)
- try to find a field in the list of known fields
- Parameters:
- fld - - the field to try to find
- Returns:
- s index into list if found or -1 if not found