public final class IoStreams extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
IoStreams.Counter |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Closeable closeable,
Consumer<IOException> errorHandler) |
static InputStream |
closeProtect(InputStream is) |
static OutputStream |
closeProtect(OutputStream os) |
static long |
copy(InputStream source,
OutputStream sink)
Reads all bytes from an input stream and writes them to an output stream.
|
static InputStream |
count(InputStream is,
IoStreams.Counter counter) |
static OutputStream |
count(OutputStream os,
IoStreams.Counter counter) |
static long |
exhaust(InputStream is) |
static InputStream |
limit(InputStream is,
long limit) |
static long |
skip(InputStream is,
long count) |
static long |
waste(InputStream is,
long count) |
public static InputStream limit(InputStream is, long limit)
public static InputStream count(InputStream is, IoStreams.Counter counter)
public static OutputStream count(OutputStream os, IoStreams.Counter counter)
public static InputStream closeProtect(InputStream is)
public static OutputStream closeProtect(OutputStream os)
public static void close(Closeable closeable, Consumer<IOException> errorHandler)
public static long skip(InputStream is, long count) throws IOException
IOExceptionpublic static long waste(InputStream is, long count) throws IOException
IOExceptionpublic static long exhaust(InputStream is) throws IOException
IOExceptionpublic static long copy(InputStream source, OutputStream sink) throws IOException
Copied from java.nio.file.Files.
IOExceptionCopyright © 2017. All rights reserved.