Package com.google.common.jimfs
Enum Feature
- java.lang.Object
-
- java.lang.Enum<Feature>
-
- com.google.common.jimfs.Feature
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FILE_CHANNEL
Feature controlling support forFileChannel
.LINKS
Feature controlling support for hard links to regular files.SECURE_DIRECTORY_STREAM
Feature controlling support forSecureDirectoryStream
.SYMBOLIC_LINKS
Feature controlling support for symbolic links.
-
Constructor Summary
Constructors Modifier Constructor Description private
Feature()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Feature
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Feature[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LINKS
public static final Feature LINKS
Feature controlling support for hard links to regular files.Affected method:
Files.createLink(Path, Path)
If this feature is not enabled, this method will throw
UnsupportedOperationException
.
-
SYMBOLIC_LINKS
public static final Feature SYMBOLIC_LINKS
Feature controlling support for symbolic links.Affected methods:
Files.createSymbolicLink(Path, Path, FileAttribute...)
Files.readSymbolicLink(Path)
If this feature is not enabled, these methods will throw
UnsupportedOperationException
.
-
SECURE_DIRECTORY_STREAM
public static final Feature SECURE_DIRECTORY_STREAM
Feature controlling support forSecureDirectoryStream
.Affected methods:
Files.newDirectoryStream(Path)
Files.newDirectoryStream(Path, DirectoryStream.Filter)
Files.newDirectoryStream(Path, String)
If this feature is enabled, the
DirectoryStream
instances returned by these methods will also implementSecureDirectoryStream
.
-
FILE_CHANNEL
public static final Feature FILE_CHANNEL
Feature controlling support forFileChannel
.Affected methods:
Files.newByteChannel(Path, OpenOption...)
Files.newByteChannel(Path, Set, FileAttribute...)
FileChannel.open(Path, OpenOption...)
FileChannel.open(Path, Set, FileAttribute...)
AsynchronousFileChannel.open(Path, OpenOption...)
AsynchronousFileChannel.open(Path, Set, ExecutorService, FileAttribute...)
If this feature is not enabled, the
SeekableByteChannel
instances returned by theFiles
methods will not beFileChannel
instances and theFileChannel.open
andAsynchronousFileChannel.open
methods will throwUnsupportedOperationException
.
-
-
Method Detail
-
values
public static Feature[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Feature c : Feature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Feature valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-