Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AssetManager am = getAssets();
- InputStream is = null;
- try {
- is = am.open(filepath);
- } catch (IOException e) {
- Log.d("ARTIGOS", "Failed to open " + artigosFich[i]);
- }
- byte[] buffer;
- try {
- int size = is.available();
- buffer = new byte[size];
- is.read(buffer);
- } catch (IOException e) {
- Log.d("ARTIGOS", "Failed to read " + artigosFich[i]);
- continue;
- } finally {
- try {
- is.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- String textoDoFicheiro = new String(buffer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement