Package org.cactoos.io
Class InputWithFallback
- java.lang.Object
-
- org.cactoos.io.InputWithFallback
-
- All Implemented Interfaces:
Input
public final class InputWithFallback extends Object implements Input
Input that returns an alternative input if the main one throwsIOException
.There is no thread-safety guarantee.
- Since:
- 0.9
-
-
Constructor Summary
Constructors Constructor Description InputWithFallback(Input input)
Ctor.InputWithFallback(Input input, IoCheckedFunc<IOException,Input> alt)
Ctor.InputWithFallback(Input input, Func<IOException,Input> alt)
Ctor.InputWithFallback(Input input, Input alt)
Ctor.
-
-
-
Constructor Detail
-
InputWithFallback
public InputWithFallback(Input input)
Ctor.- Parameters:
input
- Main input
-
InputWithFallback
public InputWithFallback(Input input, Input alt)
Ctor.- Parameters:
input
- Main inputalt
- Alternative
-
InputWithFallback
public InputWithFallback(Input input, Func<IOException,Input> alt)
Ctor.- Parameters:
input
- Main inputalt
- Alternative
-
InputWithFallback
public InputWithFallback(Input input, IoCheckedFunc<IOException,Input> alt)
Ctor.- Parameters:
input
- Main inputalt
- Alternative
-
-