Code example for OutputStreamWriter

Methods: close, flush, write

0
           try { 
        	   Log.i("pushPTPMsgToType","filename:"+fsname+" numstr:"+numstr+" datastr:"+datastr);
               fos =  context.openFileOutput(fsname,Context.MODE_PRIVATE);
                
                
               OutputStreamWriter osw = new OutputStreamWriter(fos);
               osw.write(outstr);
               osw.flush();
               osw.close();
           } catch (FileNotFoundException e ){
           	Log.e("PTPMsgReceiver CreateFile",e.getLocalizedMessage());
           	 
           } catch (IOException e) {
           	Log.e("PTPMsgReceiver General IOException",e.getLocalizedMessage());
           } 
            finally { 
               if (fos != null) {
                   try { 
                       fos.flush();
                       fos.close();
                   } catch (IOException e) {