public class StringConsumer extends Object implements Command.StreamConsumer<List<String>>
StringConsumer-implementation which reads from an InputStream line-by-line and stores the
result in a List of Strings.| Constructor and Description |
|---|
StringConsumer() |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(InputStream is)
Consumes the given
InputStream. |
List<String> |
getResult()
Returns the result for this
StreamConsumer. |
public void consume(InputStream is) throws IOException
Command.StreamConsumerInputStream.consume in interface Command.StreamConsumer<List<String>>is - the InputStream to consumeIOException - if an error occurs while consumingpublic List<String> getResult()
Command.StreamConsumerStreamConsumer.getResult in interface Command.StreamConsumer<List<String>><T>Copyright © 2011–2022 aiticon GmbH. All rights reserved.