Java tutorial
//package com.java2s; import java.io.IOException; import java.io.InputStream; import android.content.Context; import android.content.res.AssetManager; public class Main { private static Context context; public static byte[] readFileFromAsset(String fileName) throws IOException { AssetManager assetMgr = context.getAssets(); InputStream is = assetMgr.open(fileName); int size = is.available(); byte[] content = new byte[size]; is.read(content); is.close(); return content; } }