public class FileUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FileUtils.StringBuilderWriter |
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(InputStream input,
Writer output,
Charset inputCharset) |
static int |
copy(Reader input,
Writer output) |
static long |
copyLarge(Reader input,
Writer output) |
static long |
copyLarge(Reader input,
Writer output,
char[] buffer) |
static FileInputStream |
openInputStream(File file) |
static FileOutputStream |
openOutputStream(File file,
boolean append) |
static String |
readFileToString(File file,
Charset charset) |
static String |
toString(InputStream input,
Charset charset) |
static void |
write(String data,
OutputStream output,
Charset charset) |
static void |
writeStringToFile(File file,
String data,
Charset charset,
boolean append) |
public static void writeStringToFile(File file, String data, Charset charset, boolean append) throws IOException
IOException
public static void write(String data, OutputStream output, Charset charset) throws IOException
IOException
public static FileOutputStream openOutputStream(File file, boolean append) throws IOException
IOException
public static String readFileToString(File file, Charset charset) throws IOException
IOException
public static FileInputStream openInputStream(File file) throws IOException
IOException
public static String toString(InputStream input, Charset charset) throws IOException
IOException
public static void copy(InputStream input, Writer output, Charset inputCharset) throws IOException
IOException
public static int copy(Reader input, Writer output) throws IOException
IOException
public static long copyLarge(Reader input, Writer output) throws IOException
IOException
public static long copyLarge(Reader input, Writer output, char[] buffer) throws IOException
IOException
Copyright © 2021. All rights reserved.