public final class Files extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
read(BufferedReader source)
Read a file source.
|
static String |
read(File source,
Charset charset)
Read a file content.
|
static String |
read(InputStream source,
Charset charset)
Read a file source.
|
static String |
read(Reader source)
Read a file source.
|
static String |
read(String location,
Charset charset)
Read a file from a classpath location.
|
public static String read(String location, Charset charset) throws IOException
location - The classpath location.charset - Charset.IOException - If the file can't be read.public static String read(File source, Charset charset) throws IOException
source - The file.charset - Charset.IOException - If the file can't be read.public static String read(InputStream source, Charset charset) throws IOException
source - The file source.charset - Charset.IOException - If the file can't be read.public static String read(Reader source) throws IOException
source - The file source.IOException - If the file can't be read.public static String read(BufferedReader source) throws IOException
source - The file source.IOException - If the file can't be read.Copyright © 2022. All rights reserved.