• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

checking file corruption

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please read this thread

https://coderanch.com/t/186082/java-developer-SCJD/certification/Data-corruption-data-file
 
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
reply
    Bookmark Topic Watch Topic
  • New Topic