Android examples for File Input Output:Json String
get String Json Array From Asset
//package com.java2s; import android.content.Context; import android.content.res.AssetManager; import java.io.IOException; import java.io.InputStream; public class Main { public static String getStringJsonArrayFromAsset(Context context, String file) {//from w w w. j ava 2 s. c om String filePath = String.format("json/%s.json", file); AssetManager assetManager = context.getAssets(); try { InputStream is = assetManager.open(filePath); int size = is.available(); byte[] buffer = new byte[size]; is.read(buffer); is.close(); return new String(buffer, "UTF-8"); } catch (IOException ex) { ex.printStackTrace(); return null; } } }