I have a file in my assets folder... how do I read it?
Now I\'m trying:
public static String readFileAsString(String filePath)
throws j
You can open an input stream using AssetsManager.
InputStream input = getAssets().open("origin");
Reader reader = new InputStreamReader(input, "UTF-8");
getAssets() is a method of the Context class.
Also note that you shouldn't recreate a buffer of characters (buf = new char[1024], the last line of your cycle).