If you have java.io.InputStream object, how should you process that object and produce a String? Suppose I have an InputStream that contains text data, and I want to convert this to a String. For example, so I can write the contents of the stream to a log file. What is the easiest way to take the InputStream and convert it to a String?
[code] public String convertStreamToString(InputStream is) {
// ??? }
[/code]