| Modifier and Type | Method and Description |
|---|---|
static String |
readFileToString(File file,
Charset charset)
Reads the content of the specified file into a string.
|
static String |
readInputStreamToString(InputStream stream,
Charset charset)
Reads the specified input stream into a string.
|
public static String readInputStreamToString(InputStream stream, Charset charset) throws IOException
stream - The input stream. Must not be null.charset - The expected character set. Must not be null.IOException - If an input exception is encountered.public static String readFileToString(File file, Charset charset) throws IOException
file - The file. Must not be null.charset - The expected character set. Must not be null.IOException - If an input exception is encountered.Copyright © 2018 Connect2id Ltd.. All rights reserved.