org.encog.persist
public class EncogDirectoryPersistence extends Object
Constructor and Description |
---|
EncogDirectoryPersistence(File parent)
Construct the object.
|
Modifier and Type | Method and Description |
---|---|
String |
getEncogType(String name)
Get the type of an Encog object in an EG file, without the
need to read the entire file.
|
File |
getParent() |
Object |
loadFromDirectory(String name)
Load a file from the directory that this object refers to.
|
static Object |
loadObject(File file)
Load the specified object.
|
static Object |
loadObject(InputStream is)
Load an object from an input stream.
|
static Object |
loadResourceObject(String res)
Load an EG object as a reousrce.
|
static void |
saveObject(File filename,
Object obj)
Save the specified object.
|
static void |
saveObject(OutputStream os,
Object obj)
Save the specified object.
|
void |
saveToDirectory(String name,
Object obj)
Save a file to the directory that this object refers to.
|
public EncogDirectoryPersistence(File parent)
parent
- The directory to use.public static Object loadResourceObject(String res)
res
- The resource name.public static Object loadObject(File file)
file
- The file to load.public static Object loadObject(InputStream is)
is
- The input stream to read from.public static void saveObject(File filename, Object obj)
filename
- The filename to save to.obj
- The Object to save.public static void saveObject(OutputStream os, Object obj)
os
- The output stream to write to.obj
- The object to save.public String getEncogType(String name)
name
- The filename to read.public final File getParent()
public final Object loadFromDirectory(String name)
name
- The name to load.Copyright © 2014. All Rights Reserved.