I am using the below code for reading my file and it is working fine, but now I want to add new text to that file. Please help me
private void loadingDictionary() {
// TODO Auto-generated method stub
AssetManager mgr;
try{
mgr = getAssets();
InputStream is = mgr.open("dictinary.txt");
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
StringBuilder stringBuilder = new StringBuilder();
String ls = ",";
while(( line = br.readLine() ) != null){
stringBuilder.append( line );
stringBuilder.append( ls );
}
dictinaryLines = stringBuilder.toString();
dictLinesArray = dictinaryLines.split(ls);
}
catch(IOException e1){
}
}
I want to append the new text to the already existing data. Please help me.