|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdatasource.DataSource
datasource.FileSource
public class FileSource
A FileSource is a source that reads a file (sequentially);
Field Summary | |
---|---|
(package private) java.io.FileInputStream |
file
The file object to read from. |
(package private) java.lang.String |
filename
The name of the file to read. |
Fields inherited from class datasource.DataSource |
---|
CLOSED, CONNECTED, STARTING, state |
Constructor Summary | |
---|---|
FileSource(java.lang.String fname)
Open file for reading. |
Method Summary | |
---|---|
private void |
close()
Private function to close the file source. |
protected int |
readFromSrc(byte[] buf,
int len)
Perform actual read from file. |
void |
reInit()
(Re)Initialize this object. |
Methods inherited from class datasource.DataSource |
---|
read, readyToRead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.lang.String filename
java.io.FileInputStream file
Constructor Detail |
---|
public FileSource(java.lang.String fname)
Method Detail |
---|
public void reInit() throws java.io.IOException, java.io.FileNotFoundException
reInit
in class DataSource
java.io.IOException
java.io.FileNotFoundException
protected int readFromSrc(byte[] buf, int len) throws java.io.IOException
readFromSrc
in class DataSource
java.io.IOException
private 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 |