Public Member Functions | |
| String | load (String filePath) throws IOException, FileNotFoundException |
| void | save (String filePath, String content) throws IOException, FileNotFoundException |
| void | remove (String filePath) throws IOException, FileNotFoundException |
Definition at line 16 of file DojoFileStorageProvider.java.
| String load | ( | String | filePath | ) | throws IOException, FileNotFoundException [inline] |
Definition at line 17 of file DojoFileStorageProvider.java.
{
StringBuffer results = new StringBuffer();
BufferedReader reader = new BufferedReader(
new FileReader(filePath));
String line = null;
while((line = reader.readLine()) != null){
results.append(line);
}
reader.close();
return results.toString();
}
| void remove | ( | String | filePath | ) | throws IOException, FileNotFoundException [inline] |
Definition at line 42 of file DojoFileStorageProvider.java.
{
File f = new File(filePath);
if(f.exists() == false || f.isDirectory()){
return;
}
if(f.exists() && f.isFile()){
f.delete();
}
}
| void save | ( | String | filePath, | |
| String | content | |||
| ) | throws IOException, FileNotFoundException [inline] |
Definition at line 32 of file DojoFileStorageProvider.java.
{
PrintWriter writer = new PrintWriter(
new BufferedWriter(
new FileWriter(filePath, false)));
writer.print(content);
writer.close();
}
For more help developing with SiT! see http://sitracker.org/wiki/DevelopmentHowTo