erland.util
Class FileStorage

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

public class FileStorage
extends Object
implements StorageInterface

Save a string to a file

Author:
Erland Isaksson

Constructor Summary
FileStorage(String file)
          Creates a new FileStorage object
 
Method Summary
 String load()
          Reads data from file
 void save(String data)
          Save the string to file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStorage

public FileStorage(String file)
Creates a new FileStorage object

Parameters:
file - The name of the file which the string should be accessed frin
Method Detail

load

public String load()
Reads data from file

Specified by:
load in interface StorageInterface
Returns:
The string that was read from the file

save

public void save(String data)
Save the string to file.

Specified by:
save in interface StorageInterface
Parameters:
data - The string to store


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