title: decode base64 encoded value
body: <p>I have content of a file (x509crl) in base64 encoded value. I fired GET request to a servlet. By pasting following URL in a browser file download dialog pops up.</p>
  
  <pre><code>"http://host:port/myServlet?content=base64_encoded_value"
  </code></pre>
  
  <p>I was able to download a file, but I could not open a file. According to a pki expert in my workshop, if content of crl file is correct then OS should open it up just fine.</p>
  
  <p>Here is the doGet method from my servlet class. I wonder what mistakes I made. </p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse response) {
      String content = request.getParameter("content");
      response.setContentType("application/pkix-crl");
      response.setHeader("Content-Disposition","attachment;filename=test.crl");
      byte[] byteArray = Base64.decodeBase64(content.getBytes());
      ServletOutputStream sos = response.getOutputStream();
      sos.write(byteArray);
      sos.close();
  }
  </code></pre>
  
  <p>I am using commons-codec-1.3 and I didn't include any exception handling in the example. </p>