Iterate over the specified Flushable instances, invoking Flushable#flush() on each one, ignoring any potential IOExceptions. @param flushables the flushables to flush. @since 0.12.0
(Flushable... flushables)
| 1018 | * @since 0.12.0 |
| 1019 | */ |
| 1020 | public static void nullSafeFlush(Flushable... flushables) { |
| 1021 | if (flushables == null) return; |
| 1022 | for (Flushable flushable : flushables) { |
| 1023 | if (flushable != null) { |
| 1024 | try { |
| 1025 | flushable.flush(); |
| 1026 | } catch (IOException ignored) { |
| 1027 | } |
| 1028 | } |
| 1029 | } |
| 1030 | } |
| 1031 | } |