ice.util.io
Class DataStorage

java.lang.Object
  extended byice.util.io.DataStorage

public abstract class DataStorage
extends Object

Interface to persistent data storage.


Constructor Summary
DataStorage()
           
 
Method Summary
abstract  byte[] get(String dataName)
          Get data associated with dataName.
 void set(String dataName, byte[] array)
          Alias to set(dataName, array, 0, array.length);
abstract  void set(String dataName, byte[] array, int offset, int length)
          Set data associated with dataName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataStorage

public DataStorage()
Method Detail

get

public abstract byte[] get(String dataName)
                    throws IOException
Get data associated with dataName.

Parameters:
dataName - name of data storage key.
Returns:
data associated with dataName or null if dataName does not exist.
Throws:
IOException

set

public abstract void set(String dataName,
                         byte[] array,
                         int offset,
                         int length)
                  throws IOException
Set data associated with dataName.

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

set

public final void set(String dataName,
                      byte[] array)
               throws IOException
Alias to set(dataName, array, 0, array.length);

Throws:
IOException
See Also:
set(String dataName, byte[] array, int offset, int length)