public class SpinIoUtil
extends org.camunda.commons.utils.IoUtil
| Modifier and Type | Field and Description |
|---|---|
static Charset |
ENCODING_CHARSET |
| Constructor and Description |
|---|
SpinIoUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Reader |
classpathResourceAsReader(String fileName) |
static InputStream |
convertOutputStreamToInputStream(OutputStream outputStream)
Converts a
OutputStream to an InputStream by coping the data directly. |
static String |
getStringFromInputStream(InputStream inputStream)
Convert an
InputStream to a String |
static String |
getStringFromInputStream(InputStream inputStream,
boolean trim)
Convert an
InputStream to a String |
static String |
getStringFromReader(Reader reader)
|
static String |
getStringFromReader(Reader reader,
boolean trim)
|
static Reader |
stringAsReader(String string) |
public static final Charset ENCODING_CHARSET
public static InputStream convertOutputStreamToInputStream(OutputStream outputStream)
OutputStream to an InputStream by coping the data directly.
WARNING: Do not use for large data (>100MB). Only for testing purpose.outputStream - the OutputStream to convertInputStreampublic static String getStringFromInputStream(InputStream inputStream) throws IOException
InputStream to a StringinputStream - the InputStream to convertStringIOExceptionpublic static String getStringFromInputStream(InputStream inputStream, boolean trim) throws IOException
InputStream to a StringinputStream - the InputStream to converttrim - trigger if whitespaces are trimmed in the outputStringIOExceptionpublic static String getStringFromReader(Reader reader) throws IOException
reader - the Reader to convertStringIOExceptionpublic static String getStringFromReader(Reader reader, boolean trim) throws IOException
reader - the Reader to converttrim - trigger if whitespaces are trimmed in the outputStringIOExceptionCopyright © 2014–2020 Camunda Services GmbH. All rights reserved.