Java
Java DB
Documentation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PREV CLASS NEXT CLASS |
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD sun.javadb.vti.core
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class sun.javadb.vti.core. StringColumnTableFunction |
|---|
StringColumnTableFunction.SimpleBlob, StringColumnTableFunction.SimpleClob |
| Field Summary | |
|---|---|
private boolean |
_closed |
private File |
_file |
private FileReader |
_fileReader |
private int |
_lineNumber |
private LineNumberReader |
_lineReader |
private String[] |
_row |
private String |
_textFileName |
| Fields inherited from interface java.sql. ResultSet |
|---|
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE |
| Constructor Summary | |
|---|---|
FlatFileTableFunction ( String[] columnNames, String textFileName) Build a FlatFileTableFunction with the given column names. |
|
| Method Summary | |
|---|---|
void |
close () |
protected int |
getLineNumber () Get the current line number. |
protected String |
getRawColumn (int columnNumber) Get the string value of the column in the current row identified by the 1-based columnNumber. |
protected String |
getTextFileName () Get the name of the file being read. |
boolean |
next () This method advances to the next record in the file. |
protected abstract String[] |
parseRow () Parse the next chunk of text, using readLine() , and return the next row. |
protected String |
readLine () Read the next line from the file and return it. |
| Methods inherited from class sun.javadb.vti.core. StringColumnTableFunction |
|---|
findColumn, getAsciiStream, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getClob, getColumnCount, getColumnNames, getDate, getDouble, getFloat, getInt, getLong, getShort, getString, getTime, getTimestamp, wasNull, wrap, wrap |
| Methods inherited from class java.lang. Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private
String
_textFileName
private
File
_file
private
FileReader
_fileReader
private
LineNumberReader
_lineReader
private boolean
_closed
private
String[]
_row
private int
_lineNumber
| Constructor Detail |
|---|
public
FlatFileTableFunction(
String[] columnNames,
String textFileName)
Build a FlatFileTableFunction with the given column names. The function will read from the given file.
| Method Detail |
|---|
protected abstract
String[]
parseRow()
throws
SQLException
Parse the next chunk of text, using readLine() , and return the next row. Returns null if the file is exhausted.
SQLException
protected
String
getRawColumn(int columnNumber)
throws
SQLException
Get the string value of the column in the current row identified by the 1-based columnNumber. This method is called by the getXXX() methods in the StringColumnTableFunction superclass.
getRawColumn in class StringColumnTableFunction SQLException
public boolean
next()
throws
SQLException
This method advances to the next record in the file. This method calls parseRow() in order to turn the record into a row. Subsequent calls to the getXXX() methods will return individual columns in that row.
SQLException
public void
close()
throws
SQLException
SQLException
protected int
getLineNumber()
Get the current line number.
protected
String
getTextFileName()
Get the name of the file being read.
protected
String
readLine()
throws
SQLException
Read the next line from the file and return it. Return null if the file is exhausted.
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||