Package com.ibm.wala.util.tables
Class StringTable
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields inherited from class com.ibm.wala.util.tables.Table
columnHeadings, rows -
Constructor Summary
ConstructorsConstructorDescriptioncreate an empty tablecreate an empty table with the same column headings as tStringTable(String[] columns) create an empty table with the given column headings -
Method Summary
Modifier and TypeMethodDescriptionclone()static StringTablereadFromDirectTextFile(String fileName, Character comment) read from a direct (native) text filestatic StringTablereadFromStream(InputStream s, Character commentToken) static StringTablereadFromStream(InputStream s, Character commentToken, Character delimiter) static StringTablereadFromTextFile(File f, Character comment) static StringreadNextNonCommentLine(LineNumberReader reader, Character commentToken) Methods inherited from class com.ibm.wala.util.tables.Table
addRow, computeColumnWidths, getColumnHeading, getElement, getNumberOfColumns, getNumberOfRows, padWithSpaces, removeRow, row2Map, toString
-
Constructor Details
-
StringTable
public StringTable()create an empty table -
StringTable
create an empty table with the same column headings as t -
StringTable
create an empty table with the given column headings
-
-
Method Details
-
readFromDirectTextFile
public static StringTable readFromDirectTextFile(String fileName, Character comment) throws FileNotFoundException, IOException read from a direct (native) text file- Throws:
IllegalArgumentException- if fileName is nullFileNotFoundExceptionIOException
-
readFromTextFile
public static StringTable readFromTextFile(File f, Character comment) throws FileNotFoundException, IOException - Parameters:
f- a file containing a table in text format, whitespace delimited- Throws:
FileNotFoundExceptionIOException
-
readFromStream
- Parameters:
s- a stream containing a table in text format, whitespace delimited- Throws:
IllegalArgumentException- if s is nullIOException
-
readFromStream
public static StringTable readFromStream(InputStream s, Character commentToken, Character delimiter) throws IOException - Parameters:
s- a stream containing a table in text format, whitespace delimited- Throws:
IllegalArgumentException- if s is nullIOException
-
readNextNonCommentLine
public static String readNextNonCommentLine(LineNumberReader reader, Character commentToken) throws IOException - Throws:
IOException
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-