erland.util
Class StringStorage

java.lang.Object
  extended by erland.util.StringStorage
All Implemented Interfaces:
StorageInterface

public class StringStorage
extends Object
implements StorageInterface

Implements a storage that stores the data in a String in memory

Author:
Erland Isaksson

Constructor Summary
StringStorage()
          Creates a new empty storage
StringStorage(String str)
          Creates a new storage based on a String
 
Method Summary
 String load()
          Read data from the storage as a string
 void save(String str)
          Store the specified string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringStorage

public StringStorage()
Creates a new empty storage


StringStorage

public StringStorage(String str)
Creates a new storage based on a String

Parameters:
str - String with data to store in the newly created storage
Method Detail

save

public void save(String str)
Description copied from interface: StorageInterface
Store the specified string

Specified by:
save in interface StorageInterface
Parameters:
str - String to store

load

public String load()
Description copied from interface: StorageInterface
Read data from the storage as a string

Specified by:
load in interface StorageInterface
Returns:
Data in the storage


Copyright © 2003-2005 Erland Isaksson. All Rights Reserved.