Package com.google.common.jimfs
Class Options
java.lang.Object
com.google.common.jimfs.Options
Utility methods for normalizing user-provided options arrays and sets to canonical immutable sets
of options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.google.common.collect.ImmutableSet
<OpenOption> private static final com.google.common.collect.ImmutableSet
<OpenOption> private static final com.google.common.collect.ImmutableSet
<OpenOption> static final com.google.common.collect.ImmutableSet
<LinkOption> Immutable empty LinkOption set.static final com.google.common.collect.ImmutableSet
<LinkOption> Immutable set containing LinkOption.NOFOLLOW_LINKS. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.google.common.collect.ImmutableSet
<OpenOption> addWrite
(Collection<? extends OpenOption> options) Returns anImmutableSet
copy of the givenoptions
, addinginvalid reference
StandardOpenOption#WRITE
static com.google.common.collect.ImmutableSet
<CopyOption> getCopyOptions
(CopyOption... options) Returns an immutable set of the given options for a copy.static com.google.common.collect.ImmutableSet
<LinkOption> getLinkOptions
(LinkOption... options) Returns an immutable set of link options.static com.google.common.collect.ImmutableSet
<CopyOption> getMoveOptions
(CopyOption... options) Returns an immutable set of the given options for a move.static com.google.common.collect.ImmutableSet
<OpenOption> getOptionsForChannel
(Set<? extends OpenOption> options) Returns an immutable set of open options for opening a new file channel.static com.google.common.collect.ImmutableSet
<OpenOption> getOptionsForInputStream
(OpenOption... options) Returns an immutable set of open options for opening a new input stream.static com.google.common.collect.ImmutableSet
<OpenOption> getOptionsForOutputStream
(OpenOption... options) Returns an immutable set of open options for opening a new output stream.
-
Field Details
-
NOFOLLOW_LINKS
Immutable set containing LinkOption.NOFOLLOW_LINKS. -
FOLLOW_LINKS
Immutable empty LinkOption set. -
DEFAULT_READ
-
DEFAULT_READ_NOFOLLOW_LINKS
-
DEFAULT_WRITE
-
-
Constructor Details
-
Options
private Options()
-
-
Method Details
-
getLinkOptions
public static com.google.common.collect.ImmutableSet<LinkOption> getLinkOptions(LinkOption... options) Returns an immutable set of link options. -
getOptionsForChannel
public static com.google.common.collect.ImmutableSet<OpenOption> getOptionsForChannel(Set<? extends OpenOption> options) Returns an immutable set of open options for opening a new file channel. -
getOptionsForInputStream
public static com.google.common.collect.ImmutableSet<OpenOption> getOptionsForInputStream(OpenOption... options) Returns an immutable set of open options for opening a new input stream. -
getOptionsForOutputStream
public static com.google.common.collect.ImmutableSet<OpenOption> getOptionsForOutputStream(OpenOption... options) Returns an immutable set of open options for opening a new output stream. -
addWrite
private static com.google.common.collect.ImmutableSet<OpenOption> addWrite(Collection<? extends OpenOption> options) Returns anImmutableSet
copy of the givenoptions
, addinginvalid reference
StandardOpenOption#WRITE
-
getMoveOptions
public static com.google.common.collect.ImmutableSet<CopyOption> getMoveOptions(CopyOption... options) Returns an immutable set of the given options for a move. -
getCopyOptions
public static com.google.common.collect.ImmutableSet<CopyOption> getCopyOptions(CopyOption... options) Returns an immutable set of the given options for a copy.
-