Package org.apache.commons.io.function
Interface IOSupplier<T>
-
- Type Parameters:
T
- the return type of the operations.
- All Known Implementing Classes:
AbstractOrigin
,AbstractOrigin.ByteArrayOrigin
,AbstractOrigin.CharSequenceOrigin
,AbstractOrigin.FileOrigin
,AbstractOrigin.InputStreamOrigin
,AbstractOrigin.OutputStreamOrigin
,AbstractOrigin.PathOrigin
,AbstractOrigin.ReaderOrigin
,AbstractOrigin.URIOrigin
,AbstractOrigin.WriterOrigin
,AbstractOriginSupplier
,AbstractStreamBuilder
,AbstractSupplier
,AutoCloseInputStream.Builder
,BOMInputStream.Builder
,BufferedFileChannelInputStream.Builder
,CharSequenceInputStream.Builder
,ChunkedOutputStream.Builder
,DeferredFileOutputStream.Builder
,FileWriterWithEncoding.Builder
,LockableFileWriter.Builder
,MemoryMappedFileInputStream.Builder
,MessageDigestCalculatingInputStream.Builder
,QueueInputStream.Builder
,RandomAccessFileInputStream.Builder
,ReadAheadInputStream.Builder
,ReaderInputStream.Builder
,ReversedLinesFileReader.Builder
,Tailer.Builder
,UncheckedBufferedReader.Builder
,UncheckedFilterInputStream.Builder
,UncheckedFilterOutputStream.Builder
,UncheckedFilterReader.Builder
,UncheckedFilterWriter.Builder
,UnsynchronizedBufferedInputStream.Builder
,UnsynchronizedByteArrayInputStream.Builder
,UnsynchronizedByteArrayOutputStream.Builder
,UnsynchronizedFilterInputStream.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>
LikeSupplier
but throwsIOException
.- Since:
- 2.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.function.Supplier<T>
asSupplier()
Creates aSupplier
for this instance that throwsUncheckedIOException
instead ofIOException
.T
get()
Gets a result.
-
-
-
Method Detail
-
asSupplier
default java.util.function.Supplier<T> asSupplier()
Creates aSupplier
for this instance that throwsUncheckedIOException
instead ofIOException
.- Returns:
- an UncheckedIOException Supplier.
- Since:
- 2.12.0
-
get
T get() throws java.io.IOException
Gets a result.- Returns:
- a result
- Throws:
java.io.IOException
- if an I/O error occurs.
-
-