public class IOHelpers extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
BUFFER_SIZE |
Constructor and Description |
---|
IOHelpers() |
Modifier and Type | Method and Description |
---|---|
static void |
close(Closeable... closeables) |
static void |
close(ZipFile... closeables) |
static void |
copy(InputStream inputStream,
OutputStream outputStream) |
static void |
copy(Reader reader,
Writer writer) |
static String |
loadFully(URL url) |
static String |
readFully(File file) |
static String |
readFully(InputStream in) |
static String |
readFully(Reader r) |
static List<String> |
readLines(File file) |
static void |
writeFully(File file,
String content) |
static void |
writeLines(File file,
List<String> lines) |
static void |
writeTo(File file,
InputStream in) |
static void |
writeTo(File file,
InputStream in,
int bufferSize) |
static void |
writeTo(File newFile,
String text)
Writes the given string as data to the given file
|
static void |
writeTo(OutputStream outputStream,
InputStream in,
boolean close) |
static void |
writeTo(OutputStream outputStream,
InputStream in,
int bufferSize,
boolean close) |
protected static final int BUFFER_SIZE
public static void writeTo(File file, InputStream in) throws IOException
IOException
public static void writeTo(File newFile, String text) throws IOException
IOException
public static void writeTo(File file, InputStream in, int bufferSize) throws IOException
IOException
public static void writeTo(OutputStream outputStream, InputStream in, boolean close) throws IOException
IOException
public static void writeTo(OutputStream outputStream, InputStream in, int bufferSize, boolean close) throws IOException
IOException
public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException
IOException
public static void copy(Reader reader, Writer writer) throws IOException
IOException
public static void close(ZipFile... closeables)
public static void close(Closeable... closeables)
public static String readFully(File file) throws IOException
IOException
public static String readFully(InputStream in) throws IOException
IOException
public static String readFully(Reader r) throws IOException
IOException
public static void writeFully(File file, String content) throws IOException
IOException
public static List<String> readLines(File file) throws IOException
IOException
public static void writeLines(File file, List<String> lines) throws IOException
IOException
public static String loadFully(URL url) throws IOException
IOException
Copyright © 2011–2016 Red Hat. All rights reserved.