• Post Reply Bookmark Topic Watch Topic
  • New Topic

Query regarding implmentation of writeXXX operations in DataOutPutStream  RSS feed

 
Vivek Kr Singh
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting familiar serialization API's in JDK. I have a simple question regarding implementation of java.io.DataOutPutStream writeXXX operations.

Here is the implementation for this API


Why there is a bitwise & with 0xFF ?

Edit : out.write will only write a byte and bitwise & with 0xFF will return a byte
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!