• 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

URLyBird--Data file

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
About Data file Format,
Comments in assignment say:
-------------------------------------------------------------------------
"All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes."
-------------------------------------------------------------------------

Does it mean I must use DataInputStream/DataOutputStream to read/write the Data file? Can I use RandomAccessFile, or others, to access Data file?

Thanks
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,

Welcome to JavaRanch and this forum.

All the instructions are telling you is the format of the data. The instructions do not specify what classes you must use.

So check what DataInputStream/DataOutputStream and RandomAccessFile implement - if you can work back to a common denominator then you can use RandomAccessFile.

Regards, Andrew
 
john luo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you, Andrew
i think i will use RandomAccessFile.
 
reply
    Bookmark Topic Watch Topic
  • New Topic