org.encog.util.file
Class Directory
- java.lang.Object
-
- org.encog.util.file.Directory
-
public final class Directory extends java.lang.ObjectDirectory utilities.
-
-
Field Summary
Fields Modifier and Type Field and Description static intBUFFER_SIZEDefault buffer size for read/write operations.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidcopyFile(java.io.File source, java.io.File target)Copy the specified file.static booleandeleteDirectory(java.io.File path)Delete a directory and all children.static java.lang.StringreadStream(java.io.InputStream is)Read the entire contents of a stream into a string.static java.lang.StringreadTextFile(java.lang.String filename)Read the entire contents of a stream into a string.
-
-
-
Field Detail
-
BUFFER_SIZE
public static final int BUFFER_SIZE
Default buffer size for read/write operations.- See Also:
- Constant Field Values
-
-
Method Detail
-
copyFile
public static void copyFile(java.io.File source, java.io.File target)Copy the specified file.- Parameters:
source- The file to copy.target- The target of the copy.
-
deleteDirectory
public static boolean deleteDirectory(java.io.File path)
Delete a directory and all children.- Parameters:
path- The path to delete.- Returns:
- True if successful.
-
readStream
public static java.lang.String readStream(java.io.InputStream is)
Read the entire contents of a stream into a string.- Parameters:
is- The input stream to read from.- Returns:
- The string that was read in.
-
readTextFile
public static java.lang.String readTextFile(java.lang.String filename)
Read the entire contents of a stream into a string.- Parameters:
filename- The input stream to read from.- Returns:
- The string that was read in.
-
-
DMelt 3.0 © DataMelt by jWork.ORG