Package org.gbif.utils.file
Class InputStreamUtils
java.lang.Object
org.gbif.utils.file.InputStreamUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclasspathStream(String path) readEntireStream(InputStream source) Converts an entire InputStream to a single String with UTF8 as the character encoding.readEntireStream(InputStream source, String encoding) Converts an entire InputStream to a single String with explicitly provided character encoding.
-
Constructor Details
-
InputStreamUtils
public InputStreamUtils()
-
-
Method Details
-
classpathStream
-
readEntireStream
Converts an entire InputStream to a single String with UTF8 as the character encoding.- Parameters:
source- source input stream to convert- Returns:
- the string representing the entire input stream
-
readEntireStream
Converts an entire InputStream to a single String with explicitly provided character encoding.- Parameters:
source- source input stream to convertencoding- the stream's character encoding- Returns:
- the string representing the entire input stream
-