[android-developers] Re: Sd card file write

2010-03-23 Thread sumit asok
adb shell is best...i can use it Linux like... On Mar 17, 11:44 am, Bob Kerns wrote: > I can't really make out what you're doing. > > You have a 'bos.write(myByte);' line that references bos, with no clue > what that is. > > I don't know what myvals or x are intended to be. > > I don't see a file

[android-developers] Re: Sd card file write

2010-03-23 Thread sumit asok
yes ...actually i closed fileconnection at three points( in different if conditions ), but there was a condition i missed out...when I added fileconnection close() at the end...it worked... thanx for your help Bob Kerns. On Mar 18, 3:50 am, Bob Kerns wrote: > You don't need a flush() if you do a

[android-developers] Re: Sd card file write

2010-03-23 Thread sumit asok
yes ...actually i closed fileconnection at three points( in different if conditions ), but there was a condition i missed out...when I added fileconnection close() at the end...it worked... thanz for your help westmeadboy. On Mar 17, 1:47 pm, westmeadboy wrote: > Having only skimmed your post, I

[android-developers] Re: Sd card file write

2010-03-17 Thread Bob Kerns
You don't need a flush() if you do a close() on a FileOutputStream. It won't hurt, though. But close() on a FileOutputStream will flush() before it closes, if it needs to. That's not necessarily true of every type of stream, however. I'd even advice establishing the habit of doing it (though I do

[android-developers] Re: Sd card file write

2010-03-17 Thread westmeadboy
Having only skimmed your post, I would say you at least need a filecon.flush() (and filecon.close()) at the end. On Mar 17, 6:37 am, sumit asok wrote: > Hi, > > I'm trying to write a file from an Http post reply to a file on the > sdcard. Everything works fine until the byte array of data is > re

[android-developers] Re: Sd card file write

2010-03-16 Thread Bob Kerns
I can't really make out what you're doing. You have a 'bos.write(myByte);' line that references bos, with no clue what that is. I don't know what myvals or x are intended to be. I don't see a filecon.close() anywhere, or a try/finally block to ensure it's closed (and preferably deleted) in the e