org.onemind.commons.java.util
Class FileUtils

java.lang.Object
  extended by 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)

Field Summary
private static java.lang.String BSLASH
          the back slash *
private static java.lang.String FSLASH
          the forward slash *
private static java.lang.String SEPARATOR
          the separator *
 
Constructor Summary
private FileUtils()
          
 
Method Summary
static java.lang.String concatFilePath(java.lang.String[] args)
          Concat the strings to be a valid file path
private static java.lang.String concatFilePath(java.lang.StringBuffer prefix, java.lang.String suffix)
          concat a meaning file path
static java.lang.String concatFilePath(java.lang.String prefix, java.lang.String suffix)
          Concat filepath with the prefix and suffix
static void copyStream(java.io.InputStream input, java.io.OutputStream output, int chunkSize)
          Copy the input to the output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

FileUtils

private FileUtils()

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 prefix
suffix - 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 prefix
suffix - 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 stream
output - the output
chunkSize - the chunk size
Throws:
java.io.IOException