public class NativeIO extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
chunkedCopy(InputStream src,
File dest)
Copy from an input stream to a file minimizing cache impact on the destination..
|
static int |
getfd(FileDescriptor descriptor)
Get system file descriptor (int) from FileDescriptor object.
|
static void |
trySkipCache(int fd,
long offset,
long len)
Remove pages from the file system page cache when they wont
be accessed again
|
public static int getfd(FileDescriptor descriptor)
descriptor - - FileDescriptor object to get fd frompublic static void trySkipCache(int fd,
long offset,
long len)
fd - The file descriptor of the source file.offset - The offset within the file.len - The length to be flushed.public static void chunkedCopy(InputStream src, File dest) throws IOException
src - Source InputStream where to copy fromdest - Destination file to copy toIOExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.