public static BiConsumer < Object , Throwable > closeInputStreamAsync ( final InputStream input ) { return ( val , err ) -> { try { input . close ( ) ; } catch ( final IOException ex ) { throw new UncheckedIOException ( "Error closing input stream" , ex ) ; } } ; }
Close an input stream in an async chain .