title: Convert Bytes to bits
body: <p>I'm working with java. </p>
  
  <p>I have a byte array (8 bits in each position of the array) and what I need to do is to put together 2 of the values of the array and get a value.</p>
  
  <p>I'll try to explain myself better; I'm extracting audio data from a audio file. This data is stored in a byte array. Each audio sample has a size of 16 bits. If the array is:</p>
  
  <p>byte[] audioData;</p>
  
  <p>What I need is to get 1 value from samples audioData[0] and audioData[1] in order to get 1 audio sample.</p>
  
  <p>Can anyone explain me how to do this?</p>
  
  <p>Thanks in advance.</p>