public class StreamHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
closeResource(Closeable resource)
Closes a resource without throwing IOExceptions
|
static String |
readInputStream(InputStream inputStream)
Reads the provided input stream into a string
|
public static String readInputStream(InputStream inputStream) throws IOException
inputStream
- the input stream to read fromIOException
- if an I/O error occurs while reading the InputStream
public static void closeResource(Closeable resource)
resource
- the resource to closeCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved