Here you can find the source of closeQuietlyWithResult(InputStream sourceInput, boolean suppressionSourceExists)
Parameter | Description |
---|---|
sourceInput | stream to close |
suppressionSourceExists | previous state of flag |
private static boolean closeQuietlyWithResult(InputStream sourceInput, boolean suppressionSourceExists)
//package com.java2s; // License as published by the Free Software Foundation; either import java.io.IOException; import java.io.InputStream; public class Main { /**//from ww w. j a v a2 s .c o m * Close input. * This method is required till https://github.com/cobertura/cobertura/issues/170 * @param sourceInput stream to close * @param suppressionSourceExists previous state of flag * @return result of close operation */ private static boolean closeQuietlyWithResult(InputStream sourceInput, boolean suppressionSourceExists) { boolean closed = suppressionSourceExists; if (sourceInput != null) { try { sourceInput.close(); } catch (IOException ignored) { closed = false; } } return closed; } }