• Post Reply Bookmark Topic Watch Topic
  • New Topic

Binary

 
zniter goh
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i use datainputstream to read a file and how can i look at the binary of the byte that i have read.
thx...
 
Shivaji Marathe
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the static toBinaryString method of the integer class.
You can also convert the byte on your own using the & operator ;-) and string manipulation
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!