Package | Description |
---|---|
org.apache.commons.io |
Provides classes for working with streams, readers, writers and files.
|
org.apache.commons.io.build |
Provides classes to implement IO builders.
|
org.apache.commons.io.file |
Provides extensions in the realm of
java.nio.file . |
org.apache.commons.io.filefilter | |
org.apache.commons.io.function |
Provides IO-only related functional interfaces for lambda expressions and method references.
|
org.apache.commons.io.input |
Provides implementations of input classes, such as
InputStream and Reader . |
org.apache.commons.io.output |
Provides implementations of output classes, such as
OutputStream and
Writer . |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
IOUtils.toString(IOSupplier<java.io.InputStream> input,
java.nio.charset.Charset charset)
Gets the contents of an
InputStream from a supplier as a String
using the specified character encoding. |
static java.lang.String |
IOUtils.toString(IOSupplier<java.io.InputStream> input,
java.nio.charset.Charset charset,
IOSupplier<java.lang.String> defaultString)
Gets the contents of an
InputStream from a supplier as a String
using the specified character encoding. |
static java.lang.String |
IOUtils.toString(IOSupplier<java.io.InputStream> input,
java.nio.charset.Charset charset,
IOSupplier<java.lang.String> defaultString)
Gets the contents of an
InputStream from a supplier as a String
using the specified character encoding. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractOrigin<T,B extends AbstractOrigin<T,B>>
Abstracts the origin of data for builders like a
File , Path , Reader , Writer , InputStream , OutputStream , and
URI . |
static class |
AbstractOrigin.ByteArrayOrigin
A
byte[] origin. |
static class |
AbstractOrigin.CharSequenceOrigin
A
CharSequence origin. |
static class |
AbstractOrigin.FileOrigin
A
File origin. |
static class |
AbstractOrigin.InputStreamOrigin
An
InputStream origin. |
static class |
AbstractOrigin.OutputStreamOrigin
An
OutputStream origin. |
static class |
AbstractOrigin.PathOrigin
A
Path origin. |
static class |
AbstractOrigin.ReaderOrigin
An
Reader origin. |
static class |
AbstractOrigin.URIOrigin
A
URI origin. |
static class |
AbstractOrigin.WriterOrigin
An
Writer origin. |
class |
AbstractOriginSupplier<T,B extends AbstractOriginSupplier<T,B>>
Abstracts building an instance of
T . |
class |
AbstractStreamBuilder<T,B extends AbstractStreamBuilder<T,B>>
Abstracts building a typed instance of
T . |
class |
AbstractSupplier<T,B extends AbstractSupplier<T,B>>
Abstracts supplying an instance of
T . |
Modifier and Type | Method and Description |
---|---|
static long |
PathUtils.copy(IOSupplier<java.io.InputStream> in,
java.nio.file.Path target,
java.nio.file.CopyOption... copyOptions)
Copies the InputStream from the supplier with
Files.copy(InputStream, Path, CopyOption...) . |
Modifier and Type | Class and Description |
---|---|
static class |
WildcardFileFilter.Builder
Builds a new
WildcardFileFilter instance. |
Modifier and Type | Method and Description |
---|---|
(package private) java.nio.file.FileVisitResult |
AbstractFileFilter.get(IOSupplier<java.nio.file.FileVisitResult> supplier) |
Modifier and Type | Method and Description |
---|---|
default IOSupplier<R> |
IOFunction.compose(IOSupplier<? extends T> before)
Returns a composed
IOFunction that first applies the before function to its input, and then applies
this function to the result. |
default IOSupplier<R> |
IOFunction.compose(java.util.function.Supplier<? extends T> before)
Returns a composed
IOFunction that first applies the before function to its input, and then applies
this function to the result. |
Modifier and Type | Method and Description |
---|---|
default <R> R |
IOStream.collect(IOSupplier<R> supplier,
IOBiConsumer<R,? super T> accumulator,
IOBiConsumer<R,R> combiner)
Like
Stream.collect(java.util.function.Supplier, java.util.function.BiConsumer, java.util.function.BiConsumer) . |
default IOSupplier<R> |
IOFunction.compose(IOSupplier<? extends T> before)
Returns a composed
IOFunction that first applies the before function to its input, and then applies
this function to the result. |
(package private) static <T> T |
Erase.get(IOSupplier<T> supplier)
Delegates to the given
IOSupplier but erases its IOException for the compiler, while still throwing
the exception at runtime. |
static <T> T |
Uncheck.get(IOSupplier<T> supplier)
Gets the result from an IO supplier.
|
static <T> T |
Uncheck.get(IOSupplier<T> supplier,
java.util.function.Supplier<java.lang.String> message)
Gets the result from an IO supplier.
|
Modifier and Type | Class and Description |
---|---|
static class |
ChunkedOutputStream.Builder
Builds a new
UnsynchronizedByteArrayOutputStream instance. |
static class |
DeferredFileOutputStream.Builder
Builds a new
DeferredFileOutputStream instance. |
static class |
FileWriterWithEncoding.Builder
Builds a new
FileWriterWithEncoding instance. |
static class |
LockableFileWriter.Builder
Builds a new
LockableFileWriter instance. |
static class |
UncheckedFilterOutputStream.Builder
Builds a new
UncheckedFilterOutputStream instance. |
static class |
UncheckedFilterWriter.Builder
Builds a new
UncheckedFilterWriter instance. |
static class |
UnsynchronizedByteArrayOutputStream.Builder
Builds a new
UnsynchronizedByteArrayOutputStream instance. |
static class |
WriterOutputStream.Builder
Builds a new
WriterOutputStream instance. |
static class |
XmlStreamWriter.Builder
Builds a new
XmlStreamWriter instance. |