Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.common
Class BinaryFileWriter

java.lang.Object
  extended byorg.evolvica.engine.AbstractOperator
      extended byorg.evolvica.core.common.AbstractGeneticOperator
          extended byorg.evolvica.core.common.AbstractWriter
              extended byorg.evolvica.core.common.FileWriter
                  extended byorg.evolvica.core.common.BinaryFileWriter
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable

public class BinaryFileWriter
extends FileWriter

Processor for saving individual sets to files in a binary format. This processor performs a serialization on the individual set. The set can be restored later using a BinaryFileInitializer}. Everytime the write() method is invoked the set is written to a different file.

Since:
0.4.0
Version:
$Revision: 1.9 $ $Date: 2004/05/26 11:57:58 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.evolvica.core.common.FileWriter
body, directory, suffix
 
Fields inherited from class org.evolvica.engine.AbstractOperator
descriptor, element, id, name
 
Constructor Summary
BinaryFileWriter()
          Constructor.
BinaryFileWriter(java.lang.String body, java.lang.String suffix)
          Constructor with filename body.
 
Method Summary
 void write(IIndividualSet set)
          Saves the individual set to a file.
 
Methods inherited from class org.evolvica.core.common.FileWriter
getBody, getDirectory, getSuffix, setBody, setDirectory, setSuffix
 
Methods inherited from class org.evolvica.core.common.AbstractWriter
process
 
Methods inherited from class org.evolvica.engine.AbstractOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.evolvica.engine.IOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 

Constructor Detail

BinaryFileWriter

public BinaryFileWriter()
Constructor.


BinaryFileWriter

public BinaryFileWriter(java.lang.String body,
                        java.lang.String suffix)
Constructor with filename body.

Parameters:
body - body of filename to write to
suffix - suffix to be used
Method Detail

write

public void write(IIndividualSet set)
Saves the individual set to a file. The set is saved to a file named <filename body>_<identifier>.<suffix>. The identifier is generated automatically to prevent overwriting old files. The default suffix is .bin.

Parameters:
set - individual set to be saved

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems