Package nbbrd.io
Interface Resource.Loader<K>
-
- All Superinterfaces:
AutoCloseable,Closeable
- Enclosing class:
- Resource
public static interface Resource.Loader<K> extends Closeable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull InputStreamload(@NonNull K key)static <K> @NonNull Resource.Loader<K>of(@NonNull IOFunction<? super K,? extends InputStream> loader)static <K> @NonNull Resource.Loader<K>of(@NonNull IOFunction<? super K,? extends InputStream> loader, @NonNull Closeable closer)
-
-
-
Method Detail
-
load
@NonNull InputStream load(@NonNull K key) throws IOException, IllegalStateException
- Throws:
IOExceptionIllegalStateException
-
of
static <K> @NonNull Resource.Loader<K> of(@NonNull IOFunction<? super K,? extends InputStream> loader)
-
of
static <K> @NonNull Resource.Loader<K> of(@NonNull IOFunction<? super K,? extends InputStream> loader, @NonNull Closeable closer)
-
-