erland.util
Class JarFileStorage

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

public class JarFileStorage
extends Object
implements StorageInterface

An implementation of StorageInterface that reads data from a file inside a jar file

Author:
Erland Isaksson

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

Constructor Detail

JarFileStorage

public JarFileStorage(String file)
Creates a new FileStorage object

Parameters:
file - The name of the file within the jar-file which the string should be accessed from
Method Detail

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

save

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

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


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