Package com.topjohnwu.superuser
Interface Shell.Task
- Enclosing class:
- Shell
public static interface Shell.Task
A task that can be executed by a shell with the method
Shell.execTask(Task)
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(OutputStream stdin, InputStream stdout, InputStream stderr) This method will be called when a task is executed by a shell.
-
Method Details
-
run
void run(@NonNull OutputStream stdin, @NonNull InputStream stdout, @NonNull InputStream stderr) throws IOException This method will be called when a task is executed by a shell. CallingCloseable.close()
on all streams is NOP (does nothing).- Parameters:
stdin
- the STDIN of the shell.stdout
- the STDOUT of the shell.stderr
- the STDERR of the shell.- Throws:
IOException
- I/O errors when doing operations with STDIN/STDOUT/STDERR
-