Top Fields Constructors Methods
org.keycloak.common.util

public final Class StreamUtil

extends Object
Class Inheritance
Imports
java.io.BufferedReader, .IOException, .InputStream, .InputStreamReader, java.nio.charset.Charset

Author
Bill Burke
Version
$Revision: 1 $

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

String representation of the input stream contents decoded using default charset
readString
(InputStream
InputStream to build the String from
in
)

Reads string from byte input stream.
public static String

Returns:

String representation of the input stream contents decoded using given charset
readString
(InputStream
InputStream to build the String from
in
,
Charset
Charset used to decode the input stream
charset
)

Reads string from byte input stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BUFFER_LENGTHback to summary
private static final int BUFFER_LENGTH

Constructor Detail

StreamUtilback to summary
private StreamUtil()

Method Detail

readStringback to summary
public static String readString(InputStream in) throws IOException

Reads string from byte input stream.

Parameters
in:InputStream

InputStream to build the String from

Returns:String

String representation of the input stream contents decoded using default charset

Annotations
@Deprecated
readStringback to summary
public static String readString(InputStream in, Charset charset) throws IOException

Reads string from byte input stream.

Parameters
in:InputStream

InputStream to build the String from

charset:Charset

Charset used to decode the input stream

Returns:String

String representation of the input stream contents decoded using given charset