title: Java byte array replace
body: <p>How can I replace a subarray of a byte array?</p>
  
  <p>I need something similar with <code>replace</code> method for strings:</p>
  
  <pre class="lang-java prettyprint-override"><code>"I want pizza".replace("pizza", "replace method for byte arrays")
  </code></pre>
  
  <p>but it should work for <code>byte[]</code>.</p>