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 String
s.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.StreamConsumer
InputStream
.consume
in interface Command.StreamConsumer<List<String>>
is
- the InputStream
to consumeIOException
- if an error occurs while consumingpublic List<String> getResult()
Command.StreamConsumer
StreamConsumer
.getResult
in interface Command.StreamConsumer<List<String>>
<T>
Copyright © 2011–2020 aiticon GmbH. All rights reserved.