This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes network dissconnection while copy file data in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply locked New topic
Author

network dissconnection while copy file data in database

Anuranjan Arya
Greenhorn

Joined: Jun 10, 2009
Posts: 17
HI,

I want to copy a file from FTP server and later i want to copy the content of the file in the database which is there on another server.
During these processes if there is any kind of network failure HOW can i find out and handle these kind of situations?


Need advice.

thanks you
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1817

If there is a network disconnect during the copy operation, there typically will be an I/O error thrown; make sure that your code that does the copying properly handles the I/O error.

For subtler errors, probably the best thing would be to get the checksum of the file before copying and again after copying; if the checksums don't match, an error occurred in the copy process.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: network dissconnection while copy file data in database
 
Similar Threads
Two network cards on linux
about networking
NX Contractor - startup mode
Help understanding what is written to configuration file and who writes what.
network dissconnection while copy file data in database