public class StringFetcherStreamReader extends Object implements FetcherStreamReader
Constructor and Description |
---|
StringFetcherStreamReader() |
Modifier and Type | Method and Description |
---|---|
String |
getData()
Get the data that was read from the stream as a
String . |
void |
readInputStream(InputStream stream)
This method is called when an
InputStream is available to read from. |
String |
toString() |
public void readInputStream(InputStream stream) throws IOException
FetcherStreamReader
InputStream
is available to read from. Do not close the
stream inside this method, this will be done inside the calling Fetcher
classes.
Simply use this method to get bytes from the stream.readInputStream
in interface FetcherStreamReader
stream
- The InputStream
.IOException
- When an IOException
occurs.public String getData()
String
. This may be null
if
the stream has yet to be read from, or if there was an error while reading the stream.String
, or null
if it has not yet
been read from or there was an error while reading it.