Example #1
0
 /**
  * Helper method to run a specified task and automatically handle the closing of the stream.
  *
  * @param stream
  * @param task
  */
 public static <S extends Closeable> void closeOnComplete(S stream, StreamTask<S> task) {
   closeOnComplete(stream, task, DEFAULT_ERROR_HANDLER);
 }