Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parsing the Data File

 
Gonella Jayprakash
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have been able to parse the data file. But I have one question regarding the 2 byte flag that indicates whether the record is valid or deleted. I am not able interpret correctly:
The flag is 2 bytes. If it is deleted record, then it will be stored as 0x8000 (per the assignment). But how can 2 bytes (that is the size of the flag) store 0x8000.

thanks,
Jayprakash
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
0x8000 is 1000 0000 0000 0000 in binary. That's 16 bits (a short in Java terms).
 
Arno Reper
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2 byte can hold 0xFFFF or 2^16 whats equals to a java short as Barry said

arno
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic