title: org.apache.http.util.ByteArrayBuffer alternative
body: <p>I am very new to android development (few hours).</p>
  
  <p>I am having problem with this import:</p>
  
  <pre><code>import org.apache.http.util.ByteArrayBuffer
  </code></pre>
  
  <p>I am using this as</p>
  
  <pre><code>    ByteArrayBuffer bytes = new ByteArrayBuffer(hex.length() / 2);
      for (int i = 0; i &lt; hex.length(); i++) {
          if (hex.charAt(i) == ' ') {
              continue;
          }
          String hexByte;
          if (i + 1 &lt; hex.length()) {
              hexByte = hex.substring(i, i + 2).trim();
              i++;
          } else {
              hexByte = hex.substring(i, i + 1);
          }
          bytes.append(Integer.parseInt(hexByte, 16));
      }
  </code></pre>
  
  <p>but,It gives me this error:
  can't resolve 'ByteArrayBuffer'
  Here are SDK Versions I am using:</p>
  
  <blockquote>
  <pre><code>minSdkVersion 18
  targetSdkVersion 23
  compileSdkVersion 23
  buildToolsVersion "23.0.3"
  </code></pre>
  </blockquote>
  
  <p>All I need to know is alternative to this problem.</p>
  
  <p>Using Android Studio 2.0</p>