Class StreamUtils

java.lang.Object
com.github.scribejava.core.utils.StreamUtils

public abstract class StreamUtils extends Object
Utils to deal with Streams.
  • Constructor Details

    • StreamUtils

      public StreamUtils()
  • Method Details

    • getStreamContents

      public static String getStreamContents(InputStream is) throws IOException
      Returns the stream contents as an UTF-8 encoded string
      Parameters:
      is - input stream
      Returns:
      string contents
      Throws:
      IOException - in any. SocketTimeout in example
    • getGzipStreamContents

      public static String getGzipStreamContents(InputStream is) throws IOException
      Return String content from a gzip stream
      Parameters:
      is - input stream
      Returns:
      string contents
      Throws:
      IOException - in any. SocketTimeout in example