• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JSCD & RandomAccessFile... is it ok?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am making extensive usage of the RandomAccessFile class in my project, but I am not sure if this is really correct.

There reason why I am asking it is because of a few lines of my specification, which says " All numeric values stored i the header information use the formats of the DataInputStream and DataOutputStream classes (...)".

By reading it, I have the felling the using RandomAccessFile for reading the database file is just wrong, however, making direct use of DataInputStream and DataOutputStream would make the code much more complex.

Would it be a mistake to use the RandomAccessFile?

Any help would be highly appreciated.

Thanks in advance,

Bernardo Sana
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RandomAccessFile implements DataInput and DataOutput, just like DataInputStream and DataOutputStream.

API docs
 
Legend has it that if you rub the right tiny ad, a genie comes out.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic