Documentation of 'org.encog.persist.EncogDirectoryPersistence' Java class
EncogDirectoryPersistence
org.encog.persist

Class EncogDirectoryPersistence



  • public class EncogDirectoryPersistence
    extends java.lang.Object
    Handles Encog persistence for a directory. This is the usual mode where each resource is stored in a separate EG file.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EncogDirectoryPersistence(java.io.File parent)
      Construct the object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EncogDirectoryPersistence

        public EncogDirectoryPersistence(java.io.File parent)
        Construct the object.
        Parameters:
        parent - The directory to use.
    • Method Detail

      • loadResourceObject

        public static java.lang.Object loadResourceObject(java.lang.String res)
        Load an EG object as a reousrce.
        Parameters:
        res - The resource name.
        Returns:
        The loaded object.
      • loadObject

        public static java.lang.Object loadObject(java.io.File file)
        Load the specified object.
        Parameters:
        file - The file to load.
        Returns:
        The loaded object.
      • loadObject

        public static java.lang.Object loadObject(java.io.InputStream is)
        Load an object from an input stream.
        Parameters:
        is - The input stream to read from.
        Returns:
        The loaded object.
      • saveObject

        public static void saveObject(java.io.File filename,
                                      java.lang.Object obj)
        Save the specified object.
        Parameters:
        filename - The filename to save to.
        obj - The Object to save.
      • saveObject

        public static void saveObject(java.io.OutputStream os,
                                      java.lang.Object obj)
        Save the specified object.
        Parameters:
        os - The output stream to write to.
        obj - The object to save.
      • getEncogType

        public 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.
        Parameters:
        name - The filename to read.
        Returns:
        The type.
      • getParent

        public final java.io.File getParent()
        Returns:
        The directory.
      • loadFromDirectory

        public final java.lang.Object loadFromDirectory(java.lang.String name)
        Load a file from the directory that this object refers to.
        Parameters:
        name - The name to load.
        Returns:
        The object.
      • saveToDirectory

        public final void saveToDirectory(java.lang.String name,
                                          java.lang.Object obj)
        Save a file to the directory that this object refers to.
        Parameters:
        name - The name to load.
        obj - The object to save.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.