ca.nengo.io
Class FileManager
java.lang.Object
ca.nengo.io.FileManager
public class FileManager
- extends java.lang.Object
Handles saving and loading of Node
TODO: a better job (this is a quick one)
TODO: is there any metadata to store?
TODO: test
Field Summary |
static java.lang.String |
ENSEMBLE_EXTENSION
Extension for serialized NEF networks |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENSEMBLE_EXTENSION
public static final java.lang.String ENSEMBLE_EXTENSION
- Extension for serialized NEF networks
- See Also:
- Constant Field Values
FileManager
public FileManager()
getDefaultLocation
public static java.io.File getDefaultLocation()
- Returns:
- Default location for saving files
setDefaultLocation
public static void setDefaultLocation(java.io.File location)
- Parameters:
location
- Default location for saving files
save
public void save(Node node,
java.io.File destination)
throws java.io.IOException
- Parameters:
node
- Node to serializedestination
- File to save serialized Node in
- Throws:
java.io.IOException
- if there's a problem writing to disk
generate
public void generate(Node node,
java.lang.String destination)
throws java.io.IOException
- Throws:
java.io.IOException
save
public void save(TimeSeries timeSeries,
java.io.File destination)
throws java.io.IOException
- Parameters:
timeSeries
- TimeSeries to serializedestination
- File to save serialized TimeSeries in
- Throws:
java.io.IOException
- if there's a problem writing to disk
load
public java.lang.Object load(java.io.File source)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Parameters:
source
- Serialized file to load
- Returns:
- Object represented by the serialized file
- Throws:
java.io.IOException
- if there's a problem writing to disk
java.lang.ClassNotFoundException
- if the serialized file contains classes
not known in this context