title: Convert String to application/octet-stream Java
body: <p>I am writing a server side application with embed jetty that receives some request from a third party client. The client uploads some small files to the server. But I am astonished to see that the client does not upload file data as application/octet-stream instead it uploads a json as application/json that includes all the metadata about the file and in a field all the data as a string. for an simple example </p>
  
  <blockquote>
    <p>{
        "_id": "fruit",
        "name": "fruit",
        "_shasum": "4954f1f8b4a8cbf9ea6b675face476f030cf7fbb",
        "tarball": "http://localhost:8585/fruit/-/fruit-2.0.0.tgz",
        "_attachments": {
        "fruit-2.0.0.tgz": {
          "content_type": "application/octet-stream",
          "data": "mF6/622swKoG0kbVvS8qCyF5r48CuyiCO60Mcl/LnOyufzAEZ5xxxhn/IT4DO4Fr4QAMAAA=",
          "length": 545
        }   } }</p>
  </blockquote>
  
  <p>Now the question is <strong>how can i convert that to .tgz file?</strong> I can not change the client so i have to work with this.</p>