APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.nio.file

public final Enum ExtendedOpenOption

extends Enum<ExtendedOpenOption>
implements OpenOption
Class Inheritance
All Implemented Interfaces
java.nio.file.OpenOption
Imports
java.nio.file.OpenOption, jdk.internal.misc.FileSystemOption

Defines extended open options supported on some platforms by Sun's provider implementation.
Since
1.7

Field Summary

Modifier and TypeField and Description
public static final ExtendedOpenOption
DIRECT

Requires that direct I/O be used for read or write access.

public static final ExtendedOpenOption
NOSHARE_DELETE

Prevent operations on the file that request delete access.

public static final ExtendedOpenOption
NOSHARE_READ

Prevent operations on the file that request read access.

public static final ExtendedOpenOption
NOSHARE_WRITE

Prevent operations on the file that request write access.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ExtendedOpenOption
public static ExtendedOpenOption[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DIRECTback to summary
public static final ExtendedOpenOption DIRECT

Requires that direct I/O be used for read or write access. Attempting to open a file with this option set will result in an UnsupportedOperationException if the operating system or file system does not support Direct I/O or a sufficient equivalent.

API Note

The DIRECT option enables performing file I/O directly between user buffers and the file thereby circumventing the operating system page cache and possibly avoiding the thrashing which could otherwise occur in I/O-intensive applications. This option may be of benefit to applications which do their own caching or do random I/O operations on large data sets. It is likely to provide the most benefit when the file is stored on a device which has high I/O throughput capacity. The option should be used with caution however as in general it is likely to degrade performance. The performance effects of using it should be evaluated in each particular circumstance.

Since
10
NOSHARE_DELETEback to summary
public static final ExtendedOpenOption NOSHARE_DELETE

Prevent operations on the file that request delete access.

NOSHARE_READback to summary
public static final ExtendedOpenOption NOSHARE_READ

Prevent operations on the file that request read access.

NOSHARE_WRITEback to summary
public static final ExtendedOpenOption NOSHARE_WRITE

Prevent operations on the file that request write access.

Constructor Detail

ExtendedOpenOptionback to summary
private ExtendedOpenOption(FileSystemOption<Void> option)

Method Detail

valueOfback to summary
public static ExtendedOpenOption valueOf(String name)
valuesback to summary
public static ExtendedOpenOption[] values()