• Post Reply Bookmark Topic Watch Topic
  • New Topic

NX:which class should i apply to access db?

 
dx wu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
quote:
--------------------------------------------
All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes. All text values, and all fields (which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field. The character encoding is 8 bit US ASCII.
----------------------------------------------
then I must use DataInputStream and DataOutputStream to access db-1x1.db?
and someone can tell me which class you use to access db-1x1.db?
 
Michael Dreese
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by net dongxiao:
then I must use DataInputStream and DataOutputStream to access db-1x1.db?
and someone can tell me which class you use to access db-1x1.db?

Hi,
I believe there are several ways to do that. The way I do is that I just use DataInputStream and DataOutputStream for file's header, and RandomAccessFile for reading/writing/updating record(s) in the db file. Hope that helps.
Cheers,
Michael
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or to be totally NIO channels and buffers
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!