|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.io.AbstractReader infovis.table.io.AbstractTableReader
public abstract class AbstractTableReader
Abstract class for loading a table from a textual file.
Constructor Summary | |
---|---|
AbstractTableReader(InputStream in,
String name,
Table table)
Creates a new AbstractTableReader object. |
Method Summary | |
---|---|
void |
close()
Closes the reader. |
StringBuffer |
getBuffer()
Returns the buffer. |
BufferedReader |
getBufferedReader()
Returns a BufferedReader associated with this stream, creating it if it does not exist yet. |
char |
getCommentChar()
Returns the commentChar. |
String |
getField()
Returns a string from the current buffer content. |
InputStream |
getIn()
Returns the input InputStream . |
Table |
getTable()
Returns the table. |
void |
ignoreLine()
Ignores all comments line plus one. |
boolean |
isEof()
Returns the eof. |
int |
read()
Read a character. |
int |
readInt()
Read an integer and return it. |
String |
readLine()
Returns a line. |
boolean |
readQuoted(char quote)
Read a field quoted with a specified quote character. |
void |
setBuffer(StringBuffer buffer)
Sets the buffer. |
void |
setCommentChar(char commentChar)
Sets the commentChar. |
void |
setEof(boolean eof)
Sets the eof. |
void |
setTable(Table table)
Sets the table. |
void |
skipToEol()
Skips the rest of the line. |
Methods inherited from class infovis.io.AbstractReader |
---|
createColumn, getEncoding, getName, guessFieldType, load, setEncoding, setIn, setName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTableReader(InputStream in, String name, Table table)
in
- the BufferedReadername
- a name.table
- the table.Method Detail |
---|
public BufferedReader getBufferedReader()
getBufferedReader
in class AbstractReader
public InputStream getIn()
InputStream
.
getIn
in class AbstractReader
InputStream
.public void close() throws IOException
close
in class AbstractReader
IOException
- when the underlying stream does sopublic final int read() throws IOException
IOException
- pass it.public void skipToEol() throws IOException
IOException
- pass the IOExceptionpublic void ignoreLine() throws IOException
IOException
- pass it.public String readLine() throws IOException
IOException
- pass it.public int readInt() throws IOException
IOException
- pass it.public boolean readQuoted(char quote) throws IOException
quote
- the quote character,
IOException
- pass exception from BufferedReader.public Table getTable()
public void setTable(Table table)
table
- The table to setpublic StringBuffer getBuffer()
public void setBuffer(StringBuffer buffer)
buffer
- The buffer to setpublic String getField()
public boolean isEof()
public void setEof(boolean eof)
eof
- The eof to setpublic char getCommentChar()
public void setCommentChar(char commentChar)
commentChar
- The commentChar to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |