|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.utils.IOUtils
public final class IOUtils
This class contains some functionallity concerning I/O communication not covered by
IOUtils
.
Method Summary | |
---|---|
static boolean |
closeGracefully(java.lang.Object o)
Closes a file, socket, stream, writer etc. without throwing exceptions. |
static java.lang.String |
formatUnixFtpFileInfo(java.io.File file,
boolean read,
boolean write)
Returns a line formated directory entry. |
static java.util.Properties |
getAppProperties()
Returns application properties (app.properties). |
static java.io.File |
getHomeDir()
Tries to figure out the application's home directory. |
static boolean |
isUNCSupported()
Checks, if UNC file naming is supported. |
static java.lang.String |
loadTextResource(java.lang.String name,
java.lang.String encoding)
Reads an arbitrary text resource from the class path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean closeGracefully(java.lang.Object o)
closeQuietly()
this
method closes any object that has a close()
-method and is not restricted to
readers, writers and streams.
o
- The object to be closed.
public static java.lang.String formatUnixFtpFileInfo(java.io.File file, boolean read, boolean write)
file
- The file to be formatted.read
- True if readable.write
- True if writable.
public static java.lang.String loadTextResource(java.lang.String name, java.lang.String encoding) throws java.io.IOException
name
- The name of the resource.encoding
- The text encoding.
java.io.IOException
- Error on accessing the resource.public static java.util.Properties getAppProperties()
public static java.io.File getHomeDir()
public static boolean isUNCSupported()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |