Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package org.anddev.android.workingwithfiles; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class WorkingWithFiles extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); try { final String TESTSTRING = new String("Hello Android"); // ##### Write a file to the disk ##### /* We have to use the openFileOutput()-method * the ActivityContext provides, to * protect your file from others and * This is done for security-reasons. * We chose MODE_WORLD_READABLE, because * we have nothing to hide in our file */ FileOutputStream fOut = openFileOutput("samplefile.txt", MODE_WORLD_READABLE); OutputStreamWriter osw = new OutputStreamWriter(fOut); // Write the string to the file osw.write(TESTSTRING); /* ensure that everything is * really written out and close */ osw.flush(); osw.close(); // ##### Read the file back in ##### /* We have to use the openFileInput()-method * the ActivityContext provides. * Again for security reasons with * openFileInput(...) */ FileInputStream fIn = openFileInput("samplefile.txt"); InputStreamReader isr = new InputStreamReader(fIn); /* Prepare a char-Array that will * hold the chars we read back in. */ char[] inputBuffer = new char[TESTSTRING.length()]; // Fill the Buffer with data from the file isr.read(inputBuffer); // Transform the chars to a String String readString = new String(inputBuffer); // Check if we read back the same chars that we had written out boolean isTheSame = TESTSTRING.equals(readString); // Celebrate =) Log.i("File Reading stuff", "success = " + isTheSame); } catch (IOException ioe) { ioe.printStackTrace(); } } }