org.neociclo.odetteftp.util
Class IoUtil

java.lang.Object
  extended by org.neociclo.odetteftp.util.IoUtil

public class IoUtil
extends Object

Version:
$Rev: 311 $ $Date: 2010-05-07 11:46:40 -0300 (Fri, 07 May 2010) $
Author:
Rafael Marins

Field Summary
static int DEFAULT_BUFFER_SIZE
          Default buffer size of 32Kb for I/O use in this library.
 
Constructor Summary
IoUtil()
           
 
Method Summary
static void buildDirIfNecessary(File path)
           
static void copy(File src, File dest)
           
static void copyStream(InputStream src, OutputStream dest)
           
static void delete(File f)
           
static void deleteDirectory(File dir)
           
static String getBaseFilename(String name)
           
static String getFilenameExtension(String filename)
           
static void move(File src, File dest)
           
static FileInputStream openInputStream(File file)
           
static FileOutputStream openOutputStream(File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
Default buffer size of 32Kb for I/O use in this library.

See Also:
Constant Field Values
Constructor Detail

IoUtil

public IoUtil()
Method Detail

buildDirIfNecessary

public static void buildDirIfNecessary(File path)

getFilenameExtension

public static String getFilenameExtension(String filename)

copy

public static void copy(File src,
                        File dest)
                 throws IOException
Throws:
IOException

delete

public static void delete(File f)

move

public static void move(File src,
                        File dest)
                 throws IOException
Throws:
IOException

openOutputStream

public static FileOutputStream openOutputStream(File file)
                                         throws FileNotFoundException
Throws:
FileNotFoundException

openInputStream

public static FileInputStream openInputStream(File file)
                                       throws FileNotFoundException
Throws:
FileNotFoundException

copyStream

public static void copyStream(InputStream src,
                              OutputStream dest)
                       throws IOException
Throws:
IOException

getBaseFilename

public static String getBaseFilename(String name)

deleteDirectory

public static void deleteDirectory(File dir)


ACCORD