title: Upload File with OpenCMIS has no content
body: <p>I'm trying to upload a file into my Alfresco repository using Apache Chemistry OpenCMIS.
  The file is created and the properties are correct but there is no content, the file is 0 bytes. I've double checked and there is nothing wrong with the source file.
  Here's my Java code:</p>
  
  <pre><code>File content = new File(somepath);
  try{
                      String mimeType = new  MimetypesFileTypeMap().getContentType(content);
                      logger.debug("mimetype: " + mimeType);
                      logger.debug("file: " + content.getAbsolutePath());
                      Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;();
                      properties.put(PropertyIds.OBJECT_TYPE_ID, BaseTypeId.CMIS_DOCUMENT.value());
                      properties.put(PropertyIds.NAME, content.getName());
  
  
                      FileInputStream fis = new FileInputStream(content);
                      DataInputStream dis = new DataInputStream(fis);
                      byte[] bytes = new byte[(int) content.length()];
                      dis.readFully(bytes);
  
                      ContentStream cs = new ContentStreamImpl(content.getName(), BigInteger.valueOf(bytes.length), mimeType, dis);
                      Folder folder = (Folder) session.getObjectByPath("/myfolder");
                      Document doc = folder.createDocument(properties, cs, VersioningState.MAJOR);
                      return doc.getId();
                  }catch(CmisBaseException e){
                      logger.error("error uploading file: "+ e.getMessage(), e);
                  }
  </code></pre>
  
  <p>There is no exception catched.</p>