Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.content.res.AssetManager; import java.io.IOException; import java.io.InputStream; public class Main { private static Context context; public static byte[] loadIntoBytes(String fileName) { AssetManager assetManager = context.getAssets(); try { InputStream is = assetManager.open(fileName); byte buf[] = new byte[is.available()]; is.read(buf); return buf; } catch (IOException e) { } return null; } }