Package com.ibm.wala.util.tables
Class StringTable
- java.lang.Object
-
- com.ibm.wala.util.tables.Table<String>
-
- com.ibm.wala.util.tables.StringTable
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.util.tables.Table
columnHeadings, rows
-
-
Constructor Summary
Constructors Constructor Description StringTable()
create an empty tableStringTable(StringTable t)
create an empty table with the same column headings as tStringTable(String[] columns)
create an empty table with the given column headings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
static StringTable
readFromDirectTextFile(String fileName, Character comment)
read from a direct (native) text filestatic StringTable
readFromStream(InputStream s, Character commentToken)
static StringTable
readFromStream(InputStream s, Character commentToken, Character delimiter)
static StringTable
readFromTextFile(File f, Character comment)
static String
readNextNonCommentLine(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 Detail
-
StringTable
public StringTable()
create an empty table
-
StringTable
public StringTable(StringTable t)
create an empty table with the same column headings as t
-
StringTable
public StringTable(String[] columns)
create an empty table with the given column headings
-
-
Method Detail
-
readFromDirectTextFile
public static StringTable readFromDirectTextFile(String fileName, Character comment) throws FileNotFoundException, IOException
read from a direct (native) text file- Throws:
IOException
FileNotFoundException
IllegalArgumentException
- if fileName is null
-
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:
IOException
FileNotFoundException
-
readFromStream
public static StringTable readFromStream(InputStream s, Character commentToken) throws IOException
- Parameters:
s
- a stream containing a table in text format, whitespace delimited- Throws:
IOException
IllegalArgumentException
- if s is null
-
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:
IOException
IllegalArgumentException
- if s is null
-
readNextNonCommentLine
public static String readNextNonCommentLine(LineNumberReader reader, Character commentToken) throws IOException
- Throws:
IOException
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-