# Package org.apache.commons.io.build

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

- Related Packages
  Package
  Description
  org.apache.commons.io
  Provides classes for working with streams, readers, writers and files.
- Classes
  Class
  Description
  AbstractOrigin<T,B extends AbstractOrigin<T,B>>
  Abstracts and wraps an origin for builders, where an origin is a `byte[]`, `Channel`, `CharSequence`, `File`, `InputStream`, `IORandomAccessFile`, `OutputStream`, `Path`, `RandomAccessFile`, `Reader`, `URI`, or `Writer`.
  AbstractOrigin.AbstractRandomAccessFileOrigin<T extends RandomAccessFile,B extends AbstractOrigin.AbstractRandomAccessFileOrigin<T,B>>
  A `RandomAccessFile` origin.
  AbstractOrigin.ByteArrayOrigin
  A `byte[]` origin.
  AbstractOrigin.ChannelOrigin
  A `Channel` origin.
  AbstractOrigin.CharSequenceOrigin
  A `CharSequence` origin.
  AbstractOrigin.FileOrigin
  A `File` origin.
  AbstractOrigin.InputStreamOrigin
  An `InputStream` origin.
  AbstractOrigin.IORandomAccessFileOrigin
  An `IORandomAccessFile` origin.
  AbstractOrigin.OutputStreamOrigin
  An `OutputStream` origin.
  AbstractOrigin.PathOrigin
  A `Path` origin.
  AbstractOrigin.RandomAccessFileOrigin
  A `RandomAccessFile` origin.
  AbstractOrigin.ReaderOrigin
  A `Reader` origin.
  AbstractOrigin.URIOrigin
  A `URI` origin.
  AbstractOrigin.URIOrigin.URIOpenOption
  Options for connect and read from a URI.
  AbstractOrigin.URIOrigin.URIOpenOption.Builder
  Builds URIOpenOption.
  AbstractOrigin.WriterOrigin
  A `Writer` origin.
  AbstractOriginSupplier<T,B extends AbstractOriginSupplier<T,B>>
  Abstracts building an instance of type `T` where `T` is unbounded from a wrapped origin.
  AbstractStreamBuilder<T,B extends AbstractStreamBuilder<T,B>>
  Abstracts building a typed instance of type `T` where `T` is unbounded.
  AbstractSupplier<T,B extends AbstractSupplier<T,B>>
  Abstracts supplying an instance of type `T` where `T` is unbounded.