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 Developer Certification (SCJD/OCMJD) and the fly likes checking file corruption 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 » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "checking file corruption" Watch "checking file corruption" New topic
Author

checking file corruption

David Winters Junior
Ranch Hand

Joined: Oct 30, 2007
Posts: 47
Hi All,

I am currently looking at means to test whether the file and its contents are not corrupt?

I am currently checking the size of each record size returned when i read the byte data from the database and ensuring it is the correct size.

What have others checked here?

Thanks,
david
Joshua Fix
Ranch Hand

Joined: Sep 18, 2007
Posts: 57
I don't mean to hijack this thread, but I would like to add on to the question by asking if file corruption checking is something that should be included and within the scope of the assignment.


SCJP 5.0
David Winters Junior
Ranch Hand

Joined: Oct 30, 2007
Posts: 47
Hi,

Well yes of course, if the data in the file is in anyway bad or the wrong data is contained in the .db file then the whole application will fail so yes it should be verified and checked in some way.

Thanks,
david
David Winters Junior
Ranch Hand

Joined: Oct 30, 2007
Posts: 47
Hi,

Well yes of course, if the data in the file is in anyway bad or the wrong data is contained in the .db file then the whole application will fail so yes it should be verified and checked in some way.

Thanks,
david
David Winters Junior
Ranch Hand

Joined: Oct 30, 2007
Posts: 47
please read this thread

http://www.coderanch.com/t/186082/java-developer-SCJD/certification/Data-corruption-data-file
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
I only read the magic cookie before opening the file to find out the file is correct or not.

Checking the file corruption is beyond the scope (if your instruction didn't require you to do so) and I think you'll not get an extra point if you do the things that didn't required by the instruction.

Good luck

Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: checking file corruption
 
Similar Threads
Custom Search With ArrayList
how exactly can i make out if a file in linux has just been updated or has been replaced.
Validation Error For File Size...!
WSDL implementation file
File length check - Help