title: Java simple boolean[] to byte conversion
body: <p>I have an array of 8 booleans which I want to simply convert to a byte. Is there a simple way to do this? Or do I have to use for loop?</p>
  
  <p>Personally I'd prefer a simple up to two lines solution if it exists.</p>
  
  <p>Thanks for help.</p>
  
  <p>EDIT: Possible duplicate is just one boolean to a byte, I have an array.</p>
  
  <p>ANOTHER EDIT: I get a byte from a udp packet then I set the first bit (boolean) to false, then I would need to get a byte out of that again.</p>