Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.IOException;
import java.io.InputStream;
import android.content.Context;

public class Main {
    /**
     *
     * @param assetPath
     * @return
     */
    public static InputStream openAssetPostion(Context context, String assetPath) {
        InputStream is = null;
        try {
            is = context.getAssets().open(assetPath);
            return is;
        } catch (IOException e) {
            return null;
        }
    }
}