Results 1 to 1 of 1
Thread: get File object from assets
- 05-30-2012, 12:41 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 12
- Rep Power
- 0
get File object from assets
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
But InputStream does not have the method “lenght”.Java Code:InputStream is = getResources().getAssets().open("myfile.txt");
How can I get a object “File” from android? Or convert a InputStream to a file?
Thank you very very much
Similar Threads
-
how to pass value from textfield to object or file(serializable file)
By couline in forum New To JavaReplies: 5Last Post: 03-10-2012, 04:46 PM -
Insert class file as object in a table & read the object from the blob.
By facemeguru in forum New To JavaReplies: 1Last Post: 02-02-2011, 06:11 PM -
Creation of ResourceBundle Object of propetirs file using only substring of file name
By kalwankark in forum Advanced JavaReplies: 0Last Post: 11-26-2010, 10:10 PM -
Conversion of image object into file
By aartheesrini in forum Java AppletsReplies: 0Last Post: 03-12-2009, 08:09 AM -
Initializing property object from a file
By Java Tip in forum Java TipReplies: 0Last Post: 12-29-2007, 04:55 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks