title: Decoding Base 64 In Groovy Returns Garbled Characters
body: <p>I'm using an API which returns a Base64 encoded file that I want to parse and harvest data from. I'm having trouble decoding the Base64, as it comes back with garbled characters. The code I have is below.</p>
  
  <pre><code>Base64 decoder = new Base64()
  def jsonSlurper = new JsonSlurper()
  def json = jsonSlurper.parseText(Requests.getInventory(app).toString())
  String stockB64 = json.getAt("stock")
  
  byte[] decoded = decoder.decode(stockB64)
  println(new String(decoded, "US-ASCII"))
  </code></pre>
  
  <p>I've also tried <code>println(new String(decoded, "UTF-8"))</code> and this returns the same garbled output. I've pasted in an example snipped of the output for reference.</p>
  
  <pre><code>�      ���v��� 
  ��W`�C�:�f��y�z��A��%J,S���}qF88D q )��'�C�c�X��������+n!��`nn���.��:�g����[��)��f^���c�VK��X�W_����������?4��L���D�������i�9|�X��������\���L�V���gY-K�^����
  ��b�����~s��;����g���\�ie�Ki}_������
  </code></pre>
  
  <p>What am I doing wrong here?</p>