//create file
/* FileOutputStream fout = null;
try {
fout = openFileOutput(fileName, MODE_APPEND);
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
String message2 ="*******a";
byte[] bytes = message2.getBytes();
try {
fout.write(bytes);
} catch (IOException e11) {
// TODO Auto-generated catch block
e11.printStackTrace();
}
try {
fout.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} */
//show spinner
/* String[] sses;
String res1 = "";
FileInputStream fin1 = null;
try {
fin1 = openFileInput(fileName);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int length1 = 0;
try {
length1 = fin1.available();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
byte[] buffer = new byte[length1];
try {
fin1.read(buffer);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
res1 = EncodingUtils.getString(buffer, "UTF-8"); //get string maybe utf -16
try {
fin1.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sses = res1.split("a");
final ArrayAdapter<String> adapter = new ArrayAdapter<String>( this , android.R.layout. simple_spinner_item , sses );
mSpinner .setAdapter(adapter);
*/
/* String res = "";
number = et.getText().toString();
number=(number+"a");
String fileName="a.txt";;
FileInputStream fin = null;
try {
fin = openFileInput(fileName);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int length = 0;
try {
length = fin.available();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
byte[] buffer = new byte[length];
try {
fin.read(buffer);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
res = EncodingUtils.getString(buffer, "UTF-8"); //get string maybe utf -16
try {
fin.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
res=res.replace(number,"");//delete
//write back
FileOutputStream fout = null;
try {
fout = openFileOutput(fileName, MODE_PRIVATE);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
byte[] bytes = res.getBytes();
try {
fout.write(bytes);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
fout.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} */