|
What this is
Other links
The source code
package tests;
import java.util.Properties;
import java.io.InputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import com.efsol.friki.*;
public class PropertiesFileRepository
extends InMemoryRepository
{
public PropertiesFileRepository(File input)
{
super(new Properties());
Properties props = (Properties)map;
try
{
InputStream in = new FileInputStream(input);
props.load(in);
in.close();
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
}
public Page load(String name)
{
Page page = new Page(name);
String content = (String)map.get(name);
page.setContent(content);
return page;
}
}
|
Copyright 1998-2008 Alvin Alexander
All Rights Reserved.
devdaily.com is based in louisville, kentucky, and this web site is hosted by godaddy.com