public class StorageManager extends Object
Constructor and Description |
---|
StorageManager() |
Modifier and Type | Method and Description |
---|---|
static Table |
readTable(String path)
Reads a tablesaw table into memory
|
static String |
saveTable(String folderName,
Relation table)
Saves the data from the given table in the location specified by folderName.
|
public static Table readTable(String path) throws IOException
path
- The location of the table. It is interpreted as relative to the working directory if not fully
specified. The path will typically end in ".saw", as in "mytables/nasdaq-2015.saw"IOException
- if the file cannot be readpublic static String saveTable(String folderName, Relation table) throws IOException
NOTE: If you store a table with the same name in the same folder. The data in that folder will be over-written.
The storage format is the tablesaw compressed column-oriented format, which consists of a set of file in a folder. The name of the folder is based on the name of the table.
folderName
- The location of the table (for example: "mytables")table
- The table to be savedIOException
- IOException if the file can not be readCopyright © 2017. All rights reserved.