title: Bad Base64 Error while using decode
body: <p>I'm using the following code to encode a url and then decode it and use it in my project but i keep getting errors and the app crashes when i try to load a url on this code</p>
  
  <p>any guidance is appreciated</p>
  
  <pre><code>private static String getURL() {
      String base64URL = "http://www.domain.dom/folder/folder2/2.json";
      byte[] data = Base64.decode(base64URL, Base64.NO_CLOSE);
      String text = new String(data, StandardCharsets.UTF_8);
      return text;}
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>java.lang.IllegalArgumentException: bad base-64
  </code></pre>