Package org.cactoos.scalar
Class IoChecked<T>
- java.lang.Object
-
- org.cactoos.scalar.IoChecked<T>
-
- Type Parameters:
T
- Type of result
- All Implemented Interfaces:
Scalar<T>
public final class IoChecked<T> extends Object implements Scalar<T>
Scalar that doesn't throwException
, but throwsIOException
instead.There is no thread-safety guarantee.
This class implements
Scalar
, which throws a checkedIOException
. This may not be convenient in many cases. To make it more convenient and get rid of the checked exception you can use theUnchecked
decorator.- Since:
- 0.4
-
-
Method Detail
-
value
public T value() throws IOException
Description copied from interface:Scalar
Convert it to the value.- Specified by:
value
in interfaceScalar<T>
- Returns:
- The value
- Throws:
IOException
-
-