Class ProcessConsumer
java.lang.Object
generic.concurrent.io.ProcessConsumer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconsume(InputStream is) Read the given input stream line-by-line.consume(InputStream is, Consumer<String> lineConsumer) Read the given input stream line-by-line.
-
Constructor Details
-
ProcessConsumer
public ProcessConsumer()
-
-
Method Details
-
consume
Read the given input stream line-by-line.To get all output after all reading is done you can call the blocking operation
Future.get().- Parameters:
is- the input stream- Returns:
- the future that will be complete when all lines are read
-
consume
Read the given input stream line-by-line.If you wish to get all output after all reading is done you can call the blocking operation
Future.get().- Parameters:
is- the input streamlineConsumer- the line consumer; may be null- Returns:
- the future that will be complete when all lines are read
-