public class ClientUtils extends Object
SaltClient
.Constructor and Description |
---|
ClientUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
closeQuietly(InputStream stream)
Quietly close a given stream, suppressing exceptions.
|
static ParameterizedType |
parameterizedType(Type ownerType,
Type rawType,
Type... typeArguments)
Helper for constructing parameterized types.
|
static String |
streamToString(InputStream inputStream)
Convert a given
InputStream to a String . |
static InputStream |
stringToStream(String s)
Convert a given
String to an InputStream . |
public static void closeQuietly(InputStream stream)
stream
- Stream to closepublic static InputStream stringToStream(String s)
String
to an InputStream
.s
- a stringpublic static String streamToString(InputStream inputStream)
InputStream
to a String
.inputStream
- an input streampublic static ParameterizedType parameterizedType(Type ownerType, Type rawType, Type... typeArguments)
ownerType
- the owner typerawType
- the raw typetypeArguments
- the type arguments$Gson$Types.newParameterizedTypeWithOwner(java.lang.reflect.Type, java.lang.reflect.Type, java.lang.reflect.Type...)
Copyright © 2016. All rights reserved.