Can you create a utility class e.g. IOUtils in the utils package, and as a method closeQuietly and move this logic there. It is often one of the first io methods I make.

   public static void closeQuietly(Closeable c) {
        if (c == null) return;
        try {
            c.close();
        } catch (IOException ignore) {
        }
    }