ProcessBuilder.Redirect

public static abstract class ProcessBuilder.Redirect
extends Object

java.lang.Object
   ↳ java.lang.ProcessBuilder.Redirect


Represents a source of subprocess input or a destination of subprocess output. Each Redirect instance is one of the following:

Each of the above categories has an associated unique Type.

Summary

Fields

public static final ProcessBuilder.Redirect INHERIT

Indicates that subprocess I/O source or destination will be the same as those of the current process.

public static final ProcessBuilder.Redirect PIPE

Indicates that subprocess I/O will be connected to the current Java process over a pipe.

Public methods

static ProcessBuilder.Redirect appendTo(File file)

Returns a redirect to append to the specified file.

boolean equals(Object obj)

Compares the specified object with this Redirect for equality.

File file()

Returns the File source or destination associated with this redirect, or null if there is no such file.

static ProcessBuilder.Redirect from(File file)

Returns a redirect to read from the specified file.

int hashCode()

Returns a hash code value for this Redirect.

static ProcessBuilder.Redirect to(File file)

Returns a redirect to write to the specified file.

abstract ProcessBuilder.Redirect.Type type()

Returns the type of this Redirect.

Inherited methods