fipaos.tool.configurator
Class FIPAOSConfiguratorTools


public class FIPAOSConfiguratorTools

******************************************************************** FIPAOSConfiguratorTools Contains file handling tools used by the configurator


Method Summary
 static String[]getFilenames(String directory)
          ************************************************************************* getFilenames()
 static StringloadFileIntoString(String filename)
          ******************************************************************** loadFileIntoString()
 static voidmain(String[] args)
          ******************************************************************** main()
 static voidsaveStringIntoFile(String filename, String contents)
          ******************************************************************** saveStringIntoFile()
 static voidsaveStringIntoFileAndPath(String path, String filename, String contents)
          ******************************************************************** saveStringIntoFileAndPath()

Method Detail

getFilenames

public static String[] getFilenames(String directory)
************************************************************************* getFilenames()
Parameters:
directory. - A String containing the directory to search in.
Returns: String[] containing the filenames found in the given directory.

loadFileIntoString

public static String loadFileIntoString(String filename)
throws java.io.FileNotFoundException,
java.io.IOException
******************************************************************** loadFileIntoString()
Parameters:
String. - The filename to load
Returns: String. The contents of the file

main

public static void main(String[] args)
throws java.lang.Exception
******************************************************************** main()

saveStringIntoFile

public static void saveStringIntoFile(String filename, String contents)
throws java.io.IOException
******************************************************************** saveStringIntoFile()
Parameters:
String. - The filename to save as
String. - The contents to save into the file

saveStringIntoFileAndPath

public static void saveStringIntoFileAndPath(String path, String filename, String contents)
throws java.io.IOException
******************************************************************** saveStringIntoFileAndPath()
Parameters:
String. - The filename to save as. The path is created if it does not exist
String. - The contents to save into the file