Tag Archives: bufferedreader

3,584 views

Android code basic rules for developers

read write file from to assets, sdcard,, internal directory, read bytes array, open save file to sdcard or internal directory, get file path, write bytes array, dir reading, dir create, for while calculation, read input , write output Download project … Continue reading

Posted in Android Examples Code | Tagged , , , , , | Comments Off on Android code basic rules for developers
7,707 views

File open read to StringBuilder close Java example

BufferedReader , FileReader, StringBuilder , readLine, close Java example Android example String MYFILE = "my_file"; FileInputStream fis = openFileInput(MYFILE); int c; String sText = ""; while((c=fis.read())!=-1) {   sText += (char)c; // convert int to char } fis.close(); Java example … Continue reading

Posted in Android Examples Code | Tagged , , , , , | Comments Off on File open read to StringBuilder close Java example
11,253 views

Get text file content from raw folder to StringBuilder Android example

StringBuilder, res/raw folder, try catch finaly throws, BufferedReader, InputStream, openRawResource, getResources Android example MainActivity.java   public class MainActivity extends Activity { TextView txtV; Context cntx;   @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); txtV = (TextView)findViewById(R.id.idLabel); cntx = this; … Continue reading

Posted in Android Examples Code | Tagged , , , , , , | Comments Off on Get text file content from raw folder to StringBuilder Android example