quickfix
Class FileUtil
java.lang.Object
quickfix.FileUtil
public class FileUtil
- extends java.lang.Object
Method Summary |
static java.lang.String |
fileAppendPath(java.lang.String pathPrefix,
java.lang.String pathSuffix)
|
static java.io.InputStream |
open(java.lang.Class<?> clazz,
java.lang.String name)
Attempt to open a file/resource from a series of locations. |
static java.io.InputStream |
open(java.lang.Class<?> clazz,
java.lang.String name,
FileUtil.Location... locations)
Attempt to open a file/resource from a series of locations. |
static java.lang.String |
sessionIdFileName(SessionID sessionID)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtil
public FileUtil()
fileAppendPath
public static java.lang.String fileAppendPath(java.lang.String pathPrefix,
java.lang.String pathSuffix)
sessionIdFileName
public static java.lang.String sessionIdFileName(SessionID sessionID)
open
public static java.io.InputStream open(java.lang.Class<?> clazz,
java.lang.String name)
- Attempt to open a file/resource from a series of locations. This method is
convenient but may not provide enough feedback (e.g., malformed URL) for some
uses. The series of locations tried is the filesystem, thread context
class loader, class resource, classloader (system classpath resource), and URL.
- Parameters:
clazz
- name
-
- Returns:
- input stream if found, or null otherwise.
open
public static java.io.InputStream open(java.lang.Class<?> clazz,
java.lang.String name,
FileUtil.Location... locations)
- Attempt to open a file/resource from a series of locations. This method is
convenient but may not provide enough feedback (e.g., malformed URL) for some
uses.
- Parameters:
clazz
- a class (can be null) for resource searchesname
- the name of the file/resourcelocations
- a series of locations that will be searched.
- Returns:
- an input stream or null if the file/resource could not be found.