Package org.apache.commons.io.build

Provides classes to implement the builder pattern for IO classes.

The main classes in this package are (indentation reflects hierarchy):

  • The root class AbstractSupplier abstracts supplying an instance of type T where T is unbounded. This class carries no state.
    • AbstractOrigin extends AbstractSupplier to abstract and wrap an origin for builders, where an origin is a byte[], Channel, CharSequence, File, InputStream, IORandomAccessFile, OutputStream, Path, RandomAccessFile, Reader, URI, or Writer.
    • AbstractOriginSupplier extends AbstractSupplier to abstract building an instance of type T where T is unbounded from a wrapped origin.
      • AbstractStreamBuilder extends AbstractOriginSupplier to abstract building a typed instance of type T where T is unbounded. This class contains various properties like a buffer size, buffer size checker, a buffer size default, buffer size maximum, Charset, Charset default, default size checker, and open options. A subclass may use all, some, or none of these properties in building instances of T.
Since:
2.12.0