db4o 2.0

com.db4o.ext
Class MemoryFile

java.lang.Object
  |
  +--com.db4o.ext.MemoryFile

public class MemoryFile
extends java.lang.Object

carries in-memory data for db4o in-memory operation.

In-memory ObjectContainers are useful for maximum performance on small databases, for swapping objects or for storing db4o format data to other media or other databases.

Be aware of the danger of running into OutOfMemory problems or complete loss of all data, in case of hardware or JVM failures.

See Also:
ExtDb4o#openMemoryFile()

Constructor Summary
MemoryFile()
          constructs a new MemoryFile without any data.
MemoryFile(byte[] bytes)
          constructs a MemoryFile to use the byte data from a previous MemoryFile.
 
Method Summary
 byte[] getBytes()
          returns the raw byte data.
 void setBytes(byte[] bytes)
          sets the raw byte data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryFile

public MemoryFile()
constructs a new MemoryFile without any data.
See Also:
ExtDb4o#openMemoryFile()

MemoryFile

public MemoryFile(byte[] bytes)
constructs a MemoryFile to use the byte data from a previous MemoryFile.
Parameters:
bytes - the raw byte data.
See Also:
ExtDb4o#openMemoryFile()
Method Detail

getBytes

public byte[] getBytes()
returns the raw byte data.

Call

setBytes

public void setBytes(byte[] bytes)
sets the raw byte data.

Caution!
Calling this method during a running Memory File session may produce unpreditable results.
Parameters:
bytes - the raw byte data.

db4o 2.0