org.apache.hadoop.io.nativeio
Class NativeIO
java.lang.Object
org.apache.hadoop.io.nativeio.NativeIO
public class NativeIO
- extends Object
JNI wrappers for various native IO-related calls not available in Java.
These functions should generally be used alongside a fallback to another
more portable mechanism.
Nested Class Summary |
static class |
NativeIO.Stat
Result type of the fstat call |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
O_RDONLY
public static final int O_RDONLY
- See Also:
- Constant Field Values
O_WRONLY
public static final int O_WRONLY
- See Also:
- Constant Field Values
O_RDWR
public static final int O_RDWR
- See Also:
- Constant Field Values
O_CREAT
public static final int O_CREAT
- See Also:
- Constant Field Values
O_EXCL
public static final int O_EXCL
- See Also:
- Constant Field Values
O_NOCTTY
public static final int O_NOCTTY
- See Also:
- Constant Field Values
O_TRUNC
public static final int O_TRUNC
- See Also:
- Constant Field Values
O_APPEND
public static final int O_APPEND
- See Also:
- Constant Field Values
O_NONBLOCK
public static final int O_NONBLOCK
- See Also:
- Constant Field Values
O_SYNC
public static final int O_SYNC
- See Also:
- Constant Field Values
O_ASYNC
public static final int O_ASYNC
- See Also:
- Constant Field Values
O_FSYNC
public static final int O_FSYNC
- See Also:
- Constant Field Values
O_NDELAY
public static final int O_NDELAY
- See Also:
- Constant Field Values
NativeIO
public NativeIO()
isAvailable
public static boolean isAvailable()
- Return true if the JNI-based native IO extensions are available.
open
public static FileDescriptor open(String path,
int flags,
int mode)
throws IOException
- Wrapper around open(2)
- Throws:
IOException
fstat
public static NativeIO.Stat fstat(FileDescriptor fd)
throws IOException
- Wrapper around fstat(2)
- Throws:
IOException
getOwner
public static String getOwner(FileDescriptor fd)
throws IOException
- Throws:
IOException
Copyright © 2009 The Apache Software Foundation