code: private static ImmutableSet<OpenOption> addWrite(Collection<? extends OpenOption> options) {
      return options.contains(WRITE)
          ? ImmutableSet.copyOf(options)
          : ImmutableSet.<OpenOption>builder().add(WRITE).addAll(options).build();
    }
docs: Returns an {@link ImmutableSet} copy of the given {@code options}, adding {@link
  StandardOpenOption#WRITE} if it isn't already present.