Hi everyone!! I need to access a txt file from android. The problem is that I should use the class “File” because I need to know the file size. This class provides the length() method but InputStream does not.
The only solution I have found in the web is
But InputStream can not tell the size of a file.
How can I get a object “File” from android?
Thank you very very much
The only solution I have found in the web is
Code:
InputStream is = getResources().getAssets().open("myfile.txt");
How can I get a object “File” from android?
Thank you very very much