private static String readFromAsset(Context context, String path) throws JSONException, IOException {
byte[] buffer;
InputStream inputStream;
try {
inputStream = context.getAssets().open(path);
} catch (IOException e) {
IOException ioException= new IOException(e.toString()+"\n\r"+
"Local REST must store in Asset Resource Folder.");
ioException.setStackTrace(e.getStackTrace());
throw ioException;
}
int size = inputStream.available();
buffer = new byte[size];
inputStream.read(buffer);
inputStream.close();
return new String(buffer);
}