Commons-IO has an IOUtils.toString(inputStream)
method, which can read all content from an input stream:
InputStream input = getInputStream();
String content = IOUtils.toString(input);
My question is shall I close the input stream manually after using it?
I thought IOUtils may close it since it has read all the content, but I can't find that in the source code.