Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import java.io.IOException; import java.util.Scanner; public class Main { public static String readFileAsset(Context ctx, String filename) throws IOException { StringBuilder builder = new StringBuilder(); Scanner s = new Scanner(ctx.getAssets().open(filename)); while (s.hasNextLine()) { builder.append(s.nextLine()); } return builder.toString(); } }