File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Class to copy .db file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Class to copy .db file." Watch "Class to copy .db file." New topic

Class to copy .db file.

donal horgan
Ranch Hand

Joined: Mar 11, 2005
Posts: 54
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

Joined: Dec 09, 2003
Posts: 118
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.
I agree. Here's the link:
subject: Class to copy .db file.
It's not a secret anymore!