Tabnine Logo
FsController.output
Code IndexAdd Tabnine to your IDE (free)

How to use
output
method
in
net.java.truevfs.kernel.spec.FsController

Best Java code snippets using net.java.truevfs.kernel.spec.FsController.output (Showing top 8 results out of 315)

origin: net.java.truevfs/truevfs-kernel-spec

@Override
public OutputSocket<? extends Entry> output(
    BitField<FsAccessOption> options,
    FsNodeName name,
    @CheckForNull Entry template) {
  return controller.output(options, name, template);
}
origin: net.java.truevfs/truevfs-kernel-spec

@Override
public final OutputSocket<? extends Entry> output(BitField<FsAccessOption> options, FsNodeName name, Entry template) {
  return controller.output(map(options), name, template);
}
origin: net.java.truevfs/truevfs-kernel-spec

/**
 * Called to prepare writing an archive file artifact of this driver to
 * the node {@code name} in {@code controller} using {@code options} and
 * the nullable {@code template}.
 * <p>
 * This method is overridable to enable modifying the given options
 * before forwarding the call to the given controller.
 * The implementation in the class {@link FsArchiveDriver} simply forwards
 * the call to the given controller with the given options unaltered.
 *
 * @param  options the options for accessing the file system node.
 * @param  controller the controller to use for writing an artifact of this
 *         driver.
 * @param  name the node name.
 * @return A sink for writing an artifact of this driver.
 * @see    #newOutput(FsModel, BitField, FsController, FsNodeName, InputService)
 */
protected FsOutputSocketSink sink(
    BitField<FsAccessOption> options,
    FsController controller,
    FsNodeName name) {
  return new FsOutputSocketSink(options,
      controller.output(options, name, null));
}
origin: net.java.truevfs/truevfs-access

OutputSocket<?> output( TPath path,
            BitField<FsAccessOption> options,
            @CheckForNull Entry template) {
  return getController().output(options, path.getNodeName(), template);
}
origin: net.java.truevfs/truevfs-access

OutputStream newOutputStream(TPath path, OpenOption... options)
throws IOException {
  return getController()
      .output(path.outputOptions(options), path.getNodeName(), null)
      .stream(null);
}
origin: net.java.truevfs/truevfs-comp-zipdriver

/**
 * This implementation modifies {@code options} in the following way before
 * it forwards the call to {@code controller}:
 * <ol>
 * <li>{@link FsAccessOption#STORE} is set.
 * <li>If {@link FsAccessOption#GROW} is set, then
 *     {@link FsAccessOption#APPEND} gets set, too, and
 *     {@link FsAccessOption#CACHE} gets cleared.
 * </ol>
 * <p>
 * The resulting output socket is then wrapped in a private nested class
 * for an upcast in {@link #newOutput}.
 * Thus, when overriding this method, {@link #newOutput} should get
 * overridden, too.
 * Otherwise, a class cast exception will be thrown in {@link #newOutput}.
 */
@Override
protected FsOutputSocketSink sink(
    BitField<FsAccessOption> options,
    final FsController controller,
    final FsNodeName name) {
  // Leave FsAccessOption.COMPRESS untouched - the driver shall be given
  // opportunity to get its own preferences to sort out such a conflict.
  options = options.set(STORE);
  if (options.get(GROW))
    options = options.set(APPEND).clear(CACHE);
  return new FsOutputSocketSink(options,
      controller.output(options, name, null));
}
origin: net.java.truevfs/truevfs-access

return archive
    .getController()
    .output(    options,
          tfile.getNodeName(),
          template);
.getManager()
.controller(detector(file), path.getMountPoint())
.output(    options.clear(CREATE_PARENTS),
      path.getNodeName(),
      template);
origin: net.java.truevfs/truevfs-access

SeekableByteChannel newByteChannel(
    final TPath path,
    final Set<? extends OpenOption> options,
    final FileAttribute<?>... attrs)
throws IOException {
  final FsNodeName name = path.getNodeName();
  final FsController controller = getController();
  if (options.isEmpty() || options.contains(StandardOpenOption.READ)) {
    final BitField<FsAccessOption>
        o = path.inputOptions(options).set(CACHE);
    return controller
        .input(o, name)
        .channel(null);
  } else {
    final BitField<FsAccessOption>
        o = path.outputOptions(options).set(CACHE);
    try {
      return controller
          .output(o, name, null)
          .channel(null);
    } catch (final IOException ex) {
      // TODO: Filter FileAlreadyExistsException.
      if (o.get(EXCLUSIVE) && null != controller.node(o, name))
        throw (IOException) new FileAlreadyExistsException(path.toString())
            .initCause(ex);
      throw ex;
    }
  }
}
net.java.truevfs.kernel.specFsControlleroutput

Javadoc

Returns an output socket for writing the contents of the node addressed by the given name to the file system. Note that the assertions for this file system operation equally apply to any channel or stream created by the returned output socket!

Popular methods of FsController

  • node
    Returns the file system node for the given name or nullif it doesn't exist. Modifying the returned n
  • checkAccess
    Checks if the file system node for the given name exists when constrained by the given access option
  • getModel
    Returns the file system model.
  • unlink
    Removes the named file system node from the file system. If the named file system node is a director
  • getParent
    Returns the controller for the parent file system or null if and only if this file system is not fed
  • input
    Returns an input socket for reading the contents of the file system node addressed by the given name
  • make
    Creates or replaces and finally links a chain of one or more entries for the given node name into th
  • setReadOnly
    Sets the named file system node as read-only. This method will fail for typical archive file system
  • setTime
    Makes an attempt to set the last access time of all types in the given bit field for the file system
  • sync
    Commits all unsynchronized changes to the contents of this file system to its parent file system, re

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now