org.ow2.petals.microkernel.api.util
Class NioUtil
java.lang.Object
org.ow2.petals.microkernel.api.util.NioUtil
public final class NioUtil
- extends Object
- Author:
- Rafael Marins - Fossil E-Commerce
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
copyStreamToFile
public static final void copyStreamToFile(InputStream is,
File aFile)
throws IOException
- Transfer bytes blocks using direct buffer memory allocation. Relies in
use the faster Java New I/O instead of traditional byte array move.
- Parameters:
is
- the InputStream
to copyaFile
- the output File
- Throws:
IOException
- if errors occured
checkAccess
public static final boolean checkAccess(File file)
- check if the file can be read
- Parameters:
file
-
- Returns:
- true if the file is not locked, false otherwise
Copyright © 2005-2015 Linagora. All Rights Reserved.