Well, what this API's implementer could have done, is to catch the IOException and throw RuntimeException. That makes sense, because there is no reason during normal program operation for this API to throw IOException, so if it does it must be an internal bug in the library.
This pattern is equivalent to Rust's `unwrap` and `expect`, than can be called to transform a recoverable error into a panic.
This pattern is equivalent to Rust's `unwrap` and `expect`, than can be called to transform a recoverable error into a panic.