Class Options

java.lang.Object
com.google.common.jimfs.Options

final class Options extends Object
Utility methods for normalizing user-provided options arrays and sets to canonical immutable sets of options.
  • Field Details

    • DEFAULT_READ

      private static final com.google.common.collect.ImmutableSet<OpenOption> DEFAULT_READ
    • DEFAULT_WRITE

      private static final com.google.common.collect.ImmutableSet<OpenOption> 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 an ImmutableSet copy of the given options, adding
      invalid reference
      StandardOpenOption#WRITE
      if it isn't already present.
    • 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.