Android Open Source - MyClimateAndroidWidget I O Utils






From Project

Back to project page MyClimateAndroidWidget.

License

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.

Java Source Code

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
        }
    }
}




Java Source Code List

com.migesok.myclimate.FetchDataIntentService.java
com.migesok.myclimate.IOUtils.java
com.migesok.myclimate.MyClimateAppWidgetProvider.java
com.migesok.myclimate.NetworkStateListener.java
com.migesok.myclimate.WeatherNsuClient.java