title: Your InputStream was neither an OLE2 stream, nor an OOXML stream
body: <p>I am using Apache Commons to upload a .docx file in google app engine as explained in this link
  <a href="https://developers.google.com/appengine/kb/java?csw=1#fileforms" rel="noreferrer">File upload servlet</a>. While uploading, I also want to extract text by using Apache POI libraries.</p>
  
  <p>If I pass this to the POI API: </p>
  
  <pre><code> InputStream stream = item.openStream();
  </code></pre>
  
  <p>I get the below exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
  
  public static String docx2text(InputStream is) throws Exception {
      return ExtractorFactory.createExtractor(is).getText();
  }
  </code></pre>
  
  <p>I am uploading a valid .docx document. The POI API works fine if I pass a FileInputStream object.</p>
  
  <pre><code>FileInputStream fs=new FileInputStream(new File("C:\\docs\\mydoc.docx"));
  </code></pre>