Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class to copy .db file.

 
donal horgan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me is there a class method out there which can copy a .db(or any) file to a new .db(or any) file please?
Surely there is instead of me having to read through an entire file and write it oyt to a new file.
I want it for a back up before I update the original file in my project.
 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to check this when I get home, but I think Core Java (vol. 1) shows a method which uses FileInputStream and FileOutputStream to copy a file. I think they read the input stream one byte at a time until EOF, and keep writing the bytes to the output stream.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic