Android examples for App:Assets
get InputStream From Assets
//package com.java2s; import android.content.Context; import java.io.FileNotFoundException; import java.io.InputStream; public class Main { public static InputStream getFromAssets(Context context, String fileName) throws FileNotFoundException { InputStream inputStream = null; try {/*from w ww. ja v a2 s . com*/ inputStream = context.getResources().getAssets().open(fileName); } catch (Exception e) { e.printStackTrace(); } return inputStream; } }