title: Storing 16Bit Audio on a 8bit byte array in android
body: <p>I'm confused. I needed to record sound from MIC in Android so I used the following code:</p>
  
  <pre><code>recorder = new AudioRecord(AudioSource.MIC, 44100,
                  AudioFormat.CHANNEL_IN_MONO,
                  AudioFormat.ENCODING_PCM_16BIT, N);
  buffer = new byte[N];
  //...
  recorder.read(buffer, 0, N);
  </code></pre>
  
  <p>As we know, a byte array can store values between -128 to +128 while a 16Bit sound needs a lot more storage(e.g. short and int) but surprisingly Java and Android have a <code>record</code> method which saves recorded data to a byte array.</p>
  
  <p>How that can be possible? What am I missing?</p>