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