title: Google drive export non-google doc file
body: <p>I am trying to export several files from Google drive using this code:</p>
  
  <pre><code>String str = "application/rft";
  OutputStream outputStream = new ByteArrayOutputStream();
  driveService.files().export(fileId, str).executeAndDownloadTo(outputStream);
  </code></pre>
  
  <p>and it works properly but, when I try to export an <code>application/pdf</code> or <code>application/png</code> or <code>application/jpeg</code> file I am getting this error:</p>
  
  <pre><code>403 Forbidden
  {
    "code" : 403,
    "errors" : [ {
      "domain" : "global",
      "message" : "Export only supports Google Docs.",
      "reason" : "fileNotExportable"
    } ],
    "message" : "Export only supports Google Docs."
  }
  </code></pre>
  
  <p>I would like to know if there is a way to get this file's content using Java</p>
  
  <p>Thanks in advance</p>