Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;

public class Main {
    /**
     * Close a InputStream passed in.
     *
     * @param stream - InputStream to be closed.
     */
    public static void closeBufferedReader(BufferedReader stream, String tag) {
        if (stream != null) {
            try {
                stream.close();
            } catch (IOException e) {
                Log.e(tag, "Exception occured when closing BufferedReader." + e);
            }
        }
    }
}