jasi.sim.user.archive
Class StreamArchive

java.lang.Object
  extended by jasi.sim.basic.AbstractSimArchive
      extended by jasi.sim.user.archive.StreamArchive

public class StreamArchive
extends AbstractSimArchive

An archive using serialization.


Constructor Summary
StreamArchive()
           
 
Method Summary
 java.lang.String getExtension()
          Get the file extension of an archive.
 void readElements()
          Read simulation elements from archive.
 void readEvents()
          Read simulation events from archive.
 void readFinish()
          Finish reading this archive from a file.
 void readInit(AbstractSimKernel sim, java.lang.String file)
          Initialization of reading this archive, when imported from a file.
 void readTables()
          Read condition tables from archive.
 void writeElements()
          Write simulation elements into archive.
 void writeEvents()
          Write simulation events into archive.
 void writeFinish()
          Write this archive to a file in XML format.
 void writeInit(AbstractSimKernel sim, java.lang.String file)
          Initialize this archive to export in a file in XML format.
 void writeTables()
          Write condition tables into archive.
 
Methods inherited from class jasi.sim.basic.AbstractSimArchive
read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamArchive

public StreamArchive()
Method Detail

writeInit

public void writeInit(AbstractSimKernel sim,
                      java.lang.String file)
Initialize this archive to export in a file in XML format.

Specified by:
writeInit in class AbstractSimArchive
Parameters:
sim - The simulation instance.
file - The file name.
See Also:
AbstractSimArchive.writeInit(jasi.sim.basic.AbstractSimKernel, java.lang.String)

readInit

public void readInit(AbstractSimKernel sim,
                     java.lang.String file)
Initialization of reading this archive, when imported from a file.

Specified by:
readInit in class AbstractSimArchive
Parameters:
sim - The simulation instance.
file - The file name.

writeTables

public void writeTables()
Write condition tables into archive.

Specified by:
writeTables in class AbstractSimArchive
See Also:
AbstractSimArchive.writeTables()

readTables

public void readTables()
Read condition tables from archive.

Specified by:
readTables in class AbstractSimArchive

writeElements

public void writeElements()
Write simulation elements into archive.

Specified by:
writeElements in class AbstractSimArchive
See Also:
AbstractSimArchive.writeElements()

readElements

public void readElements()
Read simulation elements from archive.

Specified by:
readElements in class AbstractSimArchive

writeEvents

public void writeEvents()
Write simulation events into archive.

Specified by:
writeEvents in class AbstractSimArchive
See Also:
AbstractSimArchive.writeEvents()

readEvents

public void readEvents()
Read simulation events from archive.

Specified by:
readEvents in class AbstractSimArchive

writeFinish

public void writeFinish()
Write this archive to a file in XML format.

Specified by:
writeFinish in class AbstractSimArchive
See Also:
AbstractSimArchive.writeFinish()

readFinish

public void readFinish()
Finish reading this archive from a file.

Specified by:
readFinish in class AbstractSimArchive

getExtension

public java.lang.String getExtension()
Get the file extension of an archive.

Specified by:
getExtension in class AbstractSimArchive
Returns:
The archive file's extension.