public abstract class IoUtils extends Object
Some IO utilities.
| Modifier and Type | Method and Description |
|---|---|
static void |
closeSilently(InputStream inputStream) |
static void |
closeSilently(OutputStream outputStream) |
static void |
closeSilently(Reader reader) |
static void |
closeSilently(Writer writer) |
static long |
copySilently(InputStream inputStream,
OutputStream outputStream,
boolean closeStreams)
Copies data.
|
static long |
copySilently(InputStream inputStream,
OutputStream outputStream,
boolean closeStreams,
InputStreamListener listener)
Copies data.
|
static long |
copySilently(Reader reader,
Writer writer,
boolean closeReaderAndWriter)
Copies characters.
|
static long |
copySilently(Reader reader,
Writer writer,
boolean closeReaderAndWriter,
ReaderListener listener)
Copies characters.
|
public static long copySilently(InputStream inputStream, OutputStream outputStream, boolean closeStreams)
inputStream - the input dataoutputStream - the output destinationcloseStreams - if true the streams will be closed otherwise they will stay openIORuntimeException - if copying failspublic static long copySilently(InputStream inputStream, OutputStream outputStream, boolean closeStreams, InputStreamListener listener)
inputStream - the input dataoutputStream - the output destinationcloseStreams - if true the streams will be closed otherwise they will stay openlistener - a listener (may be null)IORuntimeException - if copying failspublic static long copySilently(Reader reader, Writer writer, boolean closeReaderAndWriter)
reader - the readerwriter - the writercloseReaderAndWriter - if true the reader and writer will be closed otherwise they will stay openIORuntimeException - if copying failspublic static long copySilently(Reader reader, Writer writer, boolean closeReaderAndWriter, ReaderListener listener)
reader - the readerwriter - the writercloseReaderAndWriter - if true the reader and writer will be closed otherwise they will stay openlistener - a listener (may be null)IORuntimeException - if copying failspublic static void closeSilently(InputStream inputStream)
public static void closeSilently(OutputStream outputStream)
public static void closeSilently(Reader reader)
public static void closeSilently(Writer writer)
Copyright © 2017 bremersee.org. All rights reserved.