db4o 8.0

com.db4o.io
Class FileStorage

java.lang.Object
  extended by com.db4o.io.FileStorage
All Implemented Interfaces:
Storage

public class FileStorage
extends java.lang.Object
implements Storage

Storage adapter to store db4o database data to physical files on hard disc.


Nested Class Summary
static class FileStorage.FileBin
           
 
Constructor Summary
FileStorage()
           
 
Method Summary
 void delete(java.lang.String uri)
          Deletes the bin for the given URI from the storage.
 boolean exists(java.lang.String uri)
          returns true if the specified file system path already exists.
 Bin open(com.db4o.io.BinConfiguration config)
          opens a FileStorage.FileBin on the specified URI (file system path).
 void rename(java.lang.String oldUri, java.lang.String newUri)
          Renames the bin for the given old URI to the new URI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStorage

public FileStorage()
Method Detail

open

public Bin open(com.db4o.io.BinConfiguration config)
         throws Db4oIOException
opens a FileStorage.FileBin on the specified URI (file system path).

Specified by:
open in interface Storage
Throws:
Db4oIOException

exists

public boolean exists(java.lang.String uri)
returns true if the specified file system path already exists.

Specified by:
exists in interface Storage

delete

public void delete(java.lang.String uri)
            throws java.io.IOException
Description copied from interface: Storage
Deletes the bin for the given URI from the storage.

Specified by:
delete in interface Storage
Parameters:
uri - bin URI
Throws:
java.io.IOException - if the bin could not be deleted

rename

public void rename(java.lang.String oldUri,
                   java.lang.String newUri)
            throws java.io.IOException
Description copied from interface: Storage
Renames the bin for the given old URI to the new URI. If a bin for the new URI exists, it will be overwritten.

Specified by:
rename in interface Storage
Parameters:
oldUri - URI of the existing bin
newUri - future URI of the bin
Throws:
java.io.IOException - if the bin could not be deleted

db4o 8.0

Copyright 2009 Versant Corporation. All rights reserved.