Nengo.ca

ca.nengo.io
Class FileManager

java.lang.Object
  extended by 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
 
Constructor Summary
FileManager()
           
 
Method Summary
 void generate(Node node, java.lang.String destination)
           
static java.io.File getDefaultLocation()
           
 java.lang.Object load(java.io.File source)
           
 void save(Node node, java.io.File destination)
           
 void save(TimeSeries timeSeries, java.io.File destination)
           
static void setDefaultLocation(java.io.File location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENSEMBLE_EXTENSION

public static final java.lang.String ENSEMBLE_EXTENSION
Extension for serialized NEF networks

See Also:
Constant Field Values
Constructor Detail

FileManager

public FileManager()
Method Detail

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 serialize
destination - 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 serialize
destination - 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

Nengo.ca