IOError: Stream is closed

IOError: Stream is closed

BY 07 Jan 2015 General Support

Hi Guys,

I am developing an app for Gear2 Watch in which need to read some IndexDB database information from the database and write the information to a text file. I was trying to loop through a indexDB cursor and trying to write to the file But I am getting “IOError: Stream is closed.”   error on line 53.

Here is the link of my code: http://ideone.com/gr9XF0 

I searched but did not get any help.

I am wondering what is the possible reason for this error. Is there any solution? help me plz

Thanks,

Written by