• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(NX)Questions about instructions:

 
biang lin
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
These are from my instructions:
1:
"All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes."
I'm confused, must I use DataInputStream class to read these numeric values?
I only used RandomAccessFile class to read the whole db file.
2:
"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. "
What is the "null characters" to fill the rest of the field when the field is not long enough??
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi biang,
1. RandomAccessFile readXXX() and writeXXX() methods are compatible with DataInputStream and DataOutputStream. You are OK.
2. This "null character" is simply (byte) 0.
Best,
Phil.
 
biang lin
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philippe ,
Thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic