Class InputStreamUtils

java.lang.Object
org.gbif.utils.file.InputStreamUtils

public class InputStreamUtils extends Object
  • Constructor Details

  • 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

      public String readEntireStream(InputStream source, String encoding)
      Converts an entire InputStream to a single String with explicitly provided character encoding.
      Parameters:
      source - source input stream to convert
      encoding - the stream's character encoding
      Returns:
      the string representing the entire input stream