Top Inners Fields Constructors Methods
jnr.posix.util

public Class ExecIt

extends Object
Class Inheritance
Known Direct Subclasses
jnr.posix.JavaLibCHelper.PosixExec
Imports
java.io.File, .IOException, .InputStream, .OutputStream, jnr.posix.POSIXHandler

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
protected final POSIXHandler

Constructor Summary

AccessConstructor and Description
public
ExecIt(POSIXHandler
the POSIXHandler to use
handler
)

Creates a new instance of ShellLauncher

Method Summary

Modifier and TypeMethod and Description
private void
public Process
run(String... args)

public int
runAndWait(String... args)

public int
runAndWait(OutputStream output, String... args)

public int
runAndWait(OutputStream output, OutputStream error, String... args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

handlerback to summary
protected final POSIXHandler handler

Constructor Detail

ExecItback to summary
public ExecIt(POSIXHandler handler)

Creates a new instance of ShellLauncher

Parameters
handler:POSIXHandler

the POSIXHandler to use

Method Detail

handleStreamsback to summary
private void handleStreams(Process p, InputStream in, OutputStream out, OutputStream err) throws IOException
runback to summary
public Process run(String... args) throws IOException
runAndWaitback to summary
public int runAndWait(String... args) throws IOException, InterruptedException
runAndWaitback to summary
public int runAndWait(OutputStream output, String... args) throws IOException, InterruptedException
runAndWaitback to summary
public int runAndWait(OutputStream output, OutputStream error, String... args) throws IOException, InterruptedException
jnr.posix.util back to summary

private Class ExecIt.StreamPumper

extends Thread
Class Inheritance

Field Summary

Modifier and TypeField and Description
private InputStream
private boolean
private OutputStream
private volatile boolean
private final Object
Inherited from java.lang.Thread:
MAX_PRIORITYMIN_PRIORITYNORM_PRIORITY

Constructor Summary

AccessConstructor and Description
pack-priv
StreamPumper(InputStream in, OutputStream out, boolean avail)

Method Summary

Modifier and TypeMethod and Description
public void
quit()

public void
run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

This method is run by the thread when it executes.
Inherited from java.lang.Thread:
activeCountcheckAccessclonecurrentThreaddumpStackenumerategetAllStackTracesgetContextClassLoadergetDefaultUncaughtExceptionHandlergetIdgetNamegetPrioritygetStackTracegetStategetThreadGroupgetUncaughtExceptionHandlerholdsLockinterruptinterruptedisAliveisDaemonisInterruptedisVirtualjoinjoinjoinjoinofPlatformofVirtualonSpinWaitresumesetContextClassLoadersetDaemonsetDefaultUncaughtExceptionHandlersetNamesetPrioritysetUncaughtExceptionHandlersleepsleepsleepstartstartVirtualThreadstopsuspendthreadIdtoStringyield

Field Detail

inback to summary
private InputStream in
onlyIfAvailableback to summary
private boolean onlyIfAvailable
outback to summary
private OutputStream out
quitback to summary
private volatile boolean quit
waitLockback to summary
private final Object waitLock

Constructor Detail

StreamPumperback to summary
pack-priv StreamPumper(InputStream in, OutputStream out, boolean avail)

Method Detail

quitback to summary
public void quit()
runback to summary
public void run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

Doc from java.lang.Thread.run.

This method is run by the thread when it executes. Subclasses of Thread may override this method.

This method is not intended to be invoked directly. If this thread is a platform thread created with a Runnable task then invoking this method will invoke the task's run method. If this thread is a virtual thread then invoking this method directly does nothing.