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

B&S - Delete Flag

 
Muhammad Shafique
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,
In database file of B&S there is one byte flag to mark deleted record. My assignment specs says that 0 is for valid record and 0xFF (which is 255) is for deleted record. How can we store 0xFF or 255 in one byte in java? Is there anything like unsigned byte in java?

You help is appreciated!!

Shafique
 
Liviu Carausu
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The signed byte 0xFF is really -1.

You can use the method writeByte() of the RandomAccessFile.
 
Muhammad Shafique
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Liviu,

Regards
Shafique
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic