Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query regarding implmentation of writeXXX operations in DataOutPutStream

 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic