Package name.pachler.nio.file.impl
Class Unix
java.lang.Object
name.pachler.nio.file.impl.Unix
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static int
getIntDefine
(String definedName) This function retreives a value that is defined in the operating system's headers.
-
Constructor Details
-
Unix
public Unix()
-
-
Method Details
-
getIntDefine
This function retreives a value that is defined in the operating system's headers. Because values like open()'s O_CREAT flag, errno values like EBADF and other values might be defined differently on different OS flavours, it is not sufficient to simply hard-code them in the OS wrapper class. Therefore, OS Wrapper classes use a lookup mechanism to initialize their static final variables. So for instance, the O_CREAT flag for Unix's open() is defined as static final int O_CREAT member variable, initialized to the return value of the getIntDefine("O_CREAT") function call. If a defined name is given that is not known to the native implementation, an IllegalArgumentException is thrown- Parameters:
definedName
- name of the define to look up- Returns:
- the integer value associated with the given definedName.
-