title: android.util.Base64 encode/decode flags parameter
body: <p>According to the Javadoc, android.util.Base64.decode() takes two parameters: the text, and "flags". These flags are in int form and (I quote):</p>
  
  <p><code>flags  controls certain features of the decoded output. Pass DEFAULT to decode standard Base64.</code></p>
  
  <p>First off, thanks to whomever decided to write a vague Javadoc. I see that Base64 has some enumeration strings, and in practice, we have been using Base64.NO_WRAP as our flag. In this particular instance, however, we need to employ two flags: NO_WRAP, and URL_SAFE.</p>
  
  <p>How do we specify both flags? We tried separating them with a pipe ('|'), and that didn't do it.</p>
  
  <pre><code>import android.util.Base64;
  public class Foo {
      public static void main(String[] args) {
          String urlSafeBase64EncodedString = getUrlSafeBase64EncodedString();
          int flags = ????????; //Need both Base64.NO_WRAP and Base64.URL_SAFE
          String decodedString = Base64.decode(urlSafeBase64EncodedString, flags);
      }
  }
  </code></pre>
  
  <p>Thanks for your time.</p>