org.keycloak.common.util

## Class StreamUtil

- java.lang.Object
- - org.keycloak.common.util.StreamUtil

-     public final class StreamUtil
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `readString(InputStream in)` Deprecated. Use `readString(java.io.InputStream, java.nio.charset.Charset)` variant.
    `static String` | `readString(InputStream in, Charset charset)` Reads string from byte input stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### readString

          @Deprecated
          public static String readString(InputStream in)
                                               throws IOException

      Deprecated. Use `readString(java.io.InputStream, java.nio.charset.Charset)` variant.
      Reads string from byte input stream.
      Parameters:
        `in` - InputStream to build the String from
      Returns:
        String representation of the input stream contents decoded using default charset
      Throws:
        `IOException`

    - #### readString

          public static String readString(InputStream in,
                                          Charset charset)
                                   throws IOException

      Reads string from byte input stream.
      Parameters:
        `in` - InputStream to build the String from
        `charset` - Charset used to decode the input stream
      Returns:
        String representation of the input stream contents decoded using given charset
      Throws:
        `IOException`

Copyright © 2020 JBoss by Red Hat. All rights reserved.