Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect Class Reference

Inherits Thread.

Public Member Functions

final void run ()
 
void stopRun ()
 
final String getOutput ()
 

Private Attributes

final InputStream is
 
final StringBuffer output = new StringBuffer()
 
volatile boolean doRun = false
 

Static Private Attributes

static final Logger logger = Logger.getLogger(StreamToStringRedirect.class.getName())
 

Detailed Description

Asynchronously read the output of a given input stream and write to a string to be returned. Any exception during execution of the command is managed in this thread.

Definition at line 332 of file ExecUtil.java.

Member Function Documentation

final String org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.getOutput ( )

Get output filled asynchronously.
Should be called after execution

Returns
final output

Definition at line 389 of file ExecUtil.java.

final void org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.run ( )

Asynchronous read of the input stream.
Will report output as its its displayed.

See also
java.lang.Thread::run()

Definition at line 351 of file ExecUtil.java.

void org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.stopRun ( )

Stop running the stream redirect. The thread will exit out gracefully after the current readLine() on stream unblocks

Definition at line 379 of file ExecUtil.java.

Member Data Documentation

volatile boolean org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.doRun = false
private

Definition at line 337 of file ExecUtil.java.

final InputStream org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.is
private

Definition at line 335 of file ExecUtil.java.

final Logger org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.logger = Logger.getLogger(StreamToStringRedirect.class.getName())
staticprivate

Definition at line 334 of file ExecUtil.java.

final StringBuffer org.sleuthkit.autopsy.coreutils.ExecUtil.StreamToStringRedirect.output = new StringBuffer()
private

Definition at line 336 of file ExecUtil.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.