android - Text file outputted via FileOutputStream -
how output text file see individual lines of text in logcat. file in res/raw/ directory , need basic on how this. have code required information provided fileoutputstream unsure how read in first place.
to read text file raw resource folder can use following snippet:
bufferedreader br = new bufferedreader(new inputstreamreader(getresources().openrawresource(your_resource_id))); string line = null; while ((line = br.readline()) != null) { // whatever read line here // write logcat e.g. use log.i("tag", line); } br.close();
Comments
Post a Comment