ice.ri.enhancedawt.browser
Class DirectoryStorage

java.lang.Object
  extended byice.util.io.DataStorage
      extended byice.ri.enhancedawt.browser.DirectoryStorage

public class DirectoryStorage
extends DataStorage

Implementation of DataStorage that store persistent data as a file tree in a directory


Constructor Summary
DirectoryStorage(String userHomePath, String dataSubdirPath)
           
 
Method Summary
 byte[] get(String dataName)
          Get data associated with dataName.
static DirectoryStorage inHomeDir(String subdir)
           
 void set(String dataName, byte[] array, int offset, int length)
          Set data associated with dataName.
 
Methods inherited from class ice.util.io.DataStorage
set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryStorage

public DirectoryStorage(String userHomePath,
                        String dataSubdirPath)
Method Detail

inHomeDir

public static DirectoryStorage inHomeDir(String subdir)

get

public byte[] get(String dataName)
           throws IOException
Description copied from class: DataStorage
Get data associated with dataName.

Specified by:
get in class DataStorage
Parameters:
dataName - name of data storage key.
Returns:
data associated with dataName or null if dataName does not exist.
Throws:
IOException

set

public void set(String dataName,
                byte[] array,
                int offset,
                int length)
         throws IOException
Description copied from class: DataStorage
Set data associated with dataName.

Specified by:
set in class DataStorage
Parameters:
dataName - name of data storage key.
array - the data buffer.
offset - start offset of data to set in array.
length - length of data to set.
Throws:
IOException