This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

checking file corruption

 
David Winters Junior
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Winters Junior
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
 
Jeffry Kristianto Yanuar
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic