journal.io.util
Class IOHelper

java.lang.Object
  extended by journal.io.util.IOHelper

public final class IOHelper
extends Object

Author:
Hiram Chirino

Nested Class Summary
static interface IOHelper.IOStrategy
           
 
Field Summary
protected static int MAX_DIR_NAME_LENGTH
           
protected static int MAX_FILE_NAME_LENGTH
           
 
Method Summary
static void copyFile(File src, File dest)
           
static void copyInputStream(InputStream in, OutputStream out)
           
static boolean deleteChildren(File parent)
           
static boolean deleteFile(File fileToDelete)
           
static void moveFile(File src, File targetDirectory)
           
static void skipBytes(RandomAccessFile raf, int bytes)
           
static void sync(FileDescriptor fd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DIR_NAME_LENGTH

protected static final int MAX_DIR_NAME_LENGTH

MAX_FILE_NAME_LENGTH

protected static final int MAX_FILE_NAME_LENGTH
Method Detail

deleteFile

public static boolean deleteFile(File fileToDelete)

deleteChildren

public static boolean deleteChildren(File parent)

moveFile

public static void moveFile(File src,
                            File targetDirectory)
                     throws IOException
Throws:
IOException

copyFile

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

copyInputStream

public static void copyInputStream(InputStream in,
                                   OutputStream out)
                            throws IOException
Throws:
IOException

sync

public static void sync(FileDescriptor fd)
                 throws IOException
Throws:
IOException

skipBytes

public static void skipBytes(RandomAccessFile raf,
                             int bytes)
                      throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.