title: How do I convert a byte array to Base64 in Java?
body: <p>Okay, I know how to do it in C#.</p>
  
  <p>It's as simple as:</p>
  
  <pre><code>Convert.ToBase64String(byte[])
  and Convert.FromBase64String(string) to get byte[] back.
  </code></pre>
  
  <p>How can I do this in Java?</p>