com.cassinidivision.core.cassinijava
Class InputStreamHelper
java.lang.Object
com.cassinidivision.core.cassinijava.InputStreamHelper
- public class InputStreamHelper
- extends Object
Miscellaneous InputStream-based utilities.
InputStreamHelper
public InputStreamHelper()
getContentsOfUrl
public static String getContentsOfUrl(String urlString)
throws IOException
- Requests the URL specified and returns the body content from the response.
- Parameters:
urlString
- A suitable URL string.
- Returns:
- The body content returned in the HTTP response.
- Throws:
IOException
stringFromReadingEntireInputStream
public static String stringFromReadingEntireInputStream(InputStream s)
throws IOException
- Reads an arbitrary input stream and returns the contents into a string.
- Parameters:
s
- The source input stream.
- Returns:
- String containing the contents of the stream.
- Throws:
IOException