Back to project page MyClimateAndroidWidget.
The source code is released under:
Apache License
If you think the Android project MyClimateAndroidWidget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.migesok.myclimate; /*from w w w.j a v a 2s. c o m*/ import java.io.Closeable; import java.io.IOException; public final class IOUtils { private IOUtils() { //not needed } /** * Closes a <code>Closeable</code> unconditionally. * <p/> * Equivalent to {@link Closeable#close()}, except any exceptions will be ignored. * This is typically used in finally blocks. * <p/> * Example code: * <pre> * Closeable closeable = null; * try { * closeable = new FileReader("foo.txt"); * // process closeable * closeable.close(); * } catch (Exception e) { * // error handling * } finally { * IOUtils.closeQuietly(closeable); * } * </pre> * * @param closeable the object to close, may be null or already closed * @since 2.0 */ public static void closeQuietly(final Closeable closeable) { try { if (closeable != null) { closeable.close(); } } catch (final IOException ioe) { // ignore } } }