org.eclipse.higgins.rpps.core.impl
Class FileService

java.lang.Object
  extended by org.eclipse.higgins.rpps.core.impl.FileService

public class FileService
extends Object

The object used for simplifying file operations.

Author:
Sergei Yakovlev

Field Summary
static String SCRIPTS_DIR
           
static String SCRIPTS_EXT
           
 
Constructor Summary
FileService()
           
 
Method Summary
static String convertURLToPath(URL url)
          Converts feed URL to local path string.
 BufferedReader getBufferedReader(String filePath)
          Gets BufferedReader from the specified file.
 BufferedWriter getBufferedWriter(String filePath)
          Gets BufferedWriter to specified file.
static FileService getInstance()
          Creates an FileService object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCRIPTS_DIR

public static String SCRIPTS_DIR

SCRIPTS_EXT

public static String SCRIPTS_EXT
Constructor Detail

FileService

public FileService()
Method Detail

getInstance

public static FileService getInstance()
Creates an FileService object.

Returns:
the FileService object

convertURLToPath

public static String convertURLToPath(URL url)
Converts feed URL to local path string.

Parameters:
url - the feed url.
Returns:
the local path string

getBufferedReader

public BufferedReader getBufferedReader(String filePath)
                                 throws FileNotFoundException
Gets BufferedReader from the specified file.

Parameters:
filePath - the file path string.
Returns:
the BufferedReader object.
Throws:
FileNotFoundException

getBufferedWriter

public BufferedWriter getBufferedWriter(String filePath)
                                 throws IOException
Gets BufferedWriter to specified file.

Parameters:
filePath - the file path string.
Returns:
the BufferedWriter object.
Throws:
IOException