Package org.onemind.commons.java.util
Class FileUtils
- java.lang.Object
-
- org.onemind.commons.java.util.FileUtils
-
public final class FileUtils extends java.lang.Object
File related utilities methods- Version:
- $Id: FileUtils.java,v 1.3 2004/09/19 20:07:04 thlee Exp $ $Name: $
- Author:
- TiongHiang Lee (thlee@onemindsoft.org)
-
-
Constructor Summary
Constructors Modifier Constructor Description private
FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
concatFilePath(java.lang.String[] args)
Concat the strings to be a valid file pathprivate static java.lang.String
concatFilePath(java.lang.StringBuffer prefix, java.lang.String suffix)
concat a meaning file pathstatic java.lang.String
concatFilePath(java.lang.String prefix, java.lang.String suffix)
Concat filepath with the prefix and suffixstatic void
copyStream(java.io.InputStream input, java.io.OutputStream output, int chunkSize)
Copy the input to the output.
-
-
-
Field Detail
-
FSLASH
private static final java.lang.String FSLASH
the forward slash *- See Also:
- Constant Field Values
-
BSLASH
private static final java.lang.String BSLASH
the back slash *- See Also:
- Constant Field Values
-
SEPARATOR
private static final java.lang.String SEPARATOR
the separator *- See Also:
- Constant Field Values
-
-
Method Detail
-
concatFilePath
public static java.lang.String concatFilePath(java.lang.String[] args)
Concat the strings to be a valid file path- Parameters:
args
- the string- Returns:
- the file path
-
concatFilePath
public static java.lang.String concatFilePath(java.lang.String prefix, java.lang.String suffix)
Concat filepath with the prefix and suffix- Parameters:
prefix
- the prefixsuffix
- the suffix- Returns:
- the file path
-
concatFilePath
private static java.lang.String concatFilePath(java.lang.StringBuffer prefix, java.lang.String suffix)
concat a meaning file path- Parameters:
prefix
- the prefixsuffix
- the suffix- Returns:
- the concat'ed file path
-
copyStream
public static void copyStream(java.io.InputStream input, java.io.OutputStream output, int chunkSize) throws java.io.IOException
Copy the input to the output. Will not close the output after copying- Parameters:
input
- the input streamoutput
- the outputchunkSize
- the chunk size- Throws:
java.io.IOException
-
-