Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.Closeable;

import java.io.IOException;

import android.util.Log;

public class Main {
    /**
     * Convenience function - closes the given stream (can be any Closable), catching and logging exceptions
     * @param stream a Closeable to close
     */
    static public void close(final Closeable stream) {
        if (stream != null) {
            try {
                stream.close();
            } catch (IOException e) {
                Log.e("Vespucci", "Problem closing", e);
            }
        }
    }
}