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 (lenght() method) .

The only solution I have found in the web is

Java Code:
 InputStream is = getResources().getAssets().open("myfile.txt");
But InputStream does not have the method “lenght”.


How can I get a object “File” from android? Or convert a InputStream to a file?


Thank you very very much