• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

RandomAccessFile for read/write database file?

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

I have just a short question...
May I use instead of

final InputStream database = new FileInputStream(DATABASE_LOCATION);





?

Cheers,

PR.
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Was the file in fact created to be a random access file from the get-go? You may wish to give more detail on just what is going on here.

Please understand that database file often has special connotation here -- that being a file created and maintained by a database such as MySQL, and that your stating this initially confused me (sorry, but I'm easily confused!) and perhaps others as well.

Much luck!
 
Pavlo Rybakov
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, guys, my question was can I use in SCJD RandomAccessFile or MUST I use FileInputStream/FileOutputStream

I found answer in old topics ( "yes, i can" ).

Thanks.

topic CBD.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course you can use a RandomAccessFile for your SCJD assignment. I think almost 99% of the certification participants used it
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pavlo Rybakov wrote:Sorry, guys, my question was can I use in SCJD RandomAccessFile or MUST I use FileInputStream/FileOutputStream
I found answer in old topics ( "yes, i can" ).



No need to apologize as I think it is my confusion here, not yours. Luck!
 
Ranch Hand
Posts: 221
Scala Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pavlo,

Yes, I did use a RandomAccessFile in my assignment.

Best Regards,

Carlos.
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic