Class StreamUtils


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

      • StreamUtils

        public StreamUtils()
    • Method Detail

      • 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