Package org.nmap4j.core.nmap
Class ExecutionResults
java.lang.Object
org.nmap4j.core.nmap.ExecutionResults
This class contains the various outputs from an execution of nmap. This
includes the stdout and stderr.
In general it's not entirely possible for this framework to detect or handle every failure. Therefore it's always best to check the contents of stderr before wondering why there are no results.
-
Constructor Summary
ConstructorDescriptionExecutionResults
(String err, String out) Create a new ExecutionResults object from the std out and std err from the nmap execution. -
Method Summary
Modifier and TypeMethodDescriptionReturns the error stream from the nmap execution.Returns the command executed to collect these outputs.Returns the value from the output stream from the NMap execution.boolean
Returns true if the errors String is not null and it's length is greater than 0.void
Sets the value for the error stream.void
setExecutedCommand
(String command) Used to set the executed command.void
Sets the value for the std out.
-
Constructor Details
-
ExecutionResults
public ExecutionResults() -
ExecutionResults
Create a new ExecutionResults object from the std out and std err from the nmap execution.- Parameters:
err
-out
-
-
-
Method Details
-
getErrors
Returns the error stream from the nmap execution.- Returns:
-
setErrors
Sets the value for the error stream.- Parameters:
errors
-
-
getOutput
Returns the value from the output stream from the NMap execution.- Returns:
-
setOutput
Sets the value for the std out.- Parameters:
output
-
-
hasErrors
public boolean hasErrors()Returns true if the errors String is not null and it's length is greater than 0.- Returns:
-
getExecutedCommand
Returns the command executed to collect these outputs.- Returns:
-
setExecutedCommand
Used to set the executed command.- Parameters:
command
-
-