net.aavalla.utils.general
Class FileUtils

java.lang.Object
  extended by net.aavalla.utils.general.FileUtils

public class FileUtils
extends java.lang.Object

Author:
Lari Natri

Nested Class Summary
static class FileUtils.EOLStyle
          End-Of-Line style (LF, CR or CRLF)
 
Constructor Summary
FileUtils()
           
 
Method Summary
static java.io.File getClassPath(java.lang.Class c)
          Returns the filesystem path of given class.
static FileUtils.EOLStyle getFileEOLStyle(java.io.File file)
          Returns the EOL style used in file given as parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils

public FileUtils()
Method Detail

getFileEOLStyle

public static FileUtils.EOLStyle getFileEOLStyle(java.io.File file)
                                          throws java.io.FileNotFoundException,
                                                 java.io.IOException
Returns the EOL style used in file given as parameter

Throws:
java.io.FileNotFoundException
java.io.IOException

getClassPath

public static java.io.File getClassPath(java.lang.Class c)
Returns the filesystem path of given class. If class is located in a .jar file, the location of the .jar is returned. null value is returned if path cannot be determined.

Parameters:
c -
Returns:
a Directory where class is located on disk or null