org.apache.commons.io.function

## Interface IOSupplier<T>

- Type Parameters:
    `T` - the return type of the operations.
  All Known Implementing Classes:
    AbstractOrigin, AbstractOrigin.AbstractRandomAccessFileOrigin, AbstractOrigin.ByteArrayOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.IORandomAccessFileOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.RandomAccessFileOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOrigin, AbstractOriginSupplier, AbstractStreamBuilder, AbstractSupplier, AccumulatorPathVisitor.Builder, AutoCloseInputStream.Builder, BOMInputStream.Builder, BoundedInputStream.AbstractBuilder, BoundedInputStream.Builder, BufferedFileChannelInputStream.Builder, CharSequenceInputStream.Builder, ChecksumInputStream.Builder, ChunkedOutputStream.Builder, CountingPathVisitor.AbstractBuilder, CountingPathVisitor.Builder, DeferredFileOutputStream.Builder, FileAlterationObserver.Builder, FileWriterWithEncoding.Builder, LockableFileWriter.Builder, MemoryMappedFileInputStream.Builder, MessageDigestCalculatingInputStream.Builder, MessageDigestInputStream.Builder, ObservableInputStream.AbstractBuilder, ObservableInputStream.Builder, ProxyInputStream.AbstractBuilder, ProxyOutputStream.Builder, QueueInputStream.Builder, RandomAccessFileInputStream.Builder, RandomAccessFileOutputStream.Builder, ReadAheadInputStream.Builder, ReaderInputStream.Builder, ReversedLinesFileReader.Builder, SimplePathVisitor.AbstractBuilder, Tailer.Builder, ThrottledInputStream.Builder, UncheckedBufferedReader.Builder, UncheckedFilterInputStream.Builder, UncheckedFilterOutputStream.Builder, UncheckedFilterReader.Builder, UncheckedFilterWriter.Builder, UnsynchronizedBufferedInputStream.Builder, UnsynchronizedByteArrayInputStream.Builder, UnsynchronizedByteArrayOutputStream.Builder, UnsynchronizedFilterInputStream.Builder, ValidatingObjectInputStream.Builder, WildcardFileFilter.Builder, WriterOutputStream.Builder, XmlStreamReader.Builder, XmlStreamWriter.Builder
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface IOSupplier<T>

  Like `Supplier` but throws `IOException`.

  Using an IOSupplier allows you to compose usage of checked and unchecked exceptions as you best see fit.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default java.util.function.Supplier<T>` | `asSupplier()` Creates a `Supplier` for this instance that throws `UncheckedIOException` instead of `IOException`.
    `T` | `get()` Gets a result.
    `default T` | `getUnchecked()` Gets a result.

- - ### Method Detail

    - #### asSupplier

          default java.util.function.Supplier<T> asSupplier()

      Creates a `Supplier` for this instance that throws `UncheckedIOException` instead of `IOException`.
      Returns:
        an UncheckedIOException Supplier.

    - #### get

          T get()
          throws IOException

      Gets a result.
      Returns:
        a result.
      Throws:
        `IOException` - if an I/O error occurs.
      See Also:
        `getUnchecked()`

    - #### getUnchecked

          default T getUnchecked()
                          throws UncheckedIOException

      Gets a result.
      Returns:
        a result.
      Throws:
        `UncheckedIOException` - if an I/O error occurs.
      See Also:
        `get()`