Make sure you close every object that you don't need (and has a close method).
Do that in the finally block. :-) On May 5, 1:20 pm, a a <harvey.a...@gmail.com> wrote: > Dear all devs, > > try{ > File newfile = new File(prefix); > FileInputStream fileInput = new FileInputStream(newfile); > BufferedInputStream buf = new BufferedInputStream(fileInput); > final DataInputStream dataInput = new DataInputStream(buf); > ...... > .....} catch(Exception e) { > > ....// I don't know which should i close. > > ....// Can anybody tell me which should i close?? > //newfile.close() ? > //fileInput.close() ? > //buf.close() ? > // dataInput.close() ? > > > > > > > > } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en