public class InputStreamUtils extends Object
Constructor and Description |
---|
InputStreamUtils() |
Modifier and Type | Method and Description |
---|---|
InputStream |
classpathStream(String path) |
String |
readEntireStream(InputStream source)
Converts an entire InputStream to a single String with UTF8 as the character encoding.
|
String |
readEntireStream(InputStream source,
String encoding)
Converts an entire InputStream to a single String with explicitly provided character encoding.
|
public InputStreamUtils()
public InputStream classpathStream(String path)
public String readEntireStream(InputStream source)
source
- source input stream to convertpublic String readEntireStream(InputStream source, String encoding)
source
- source input stream to convertencoding
- the stream's character encodingCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.