code: public static void setFileData(final File file, final InputStream fileStream, final String contentType) throws FrameworkException, IOException {
  
  		FileHelper.writeToFile(file, fileStream);
  		setFileProperties(file, contentType);
  	}
docs: Write image data from the given InputStream to the given file node and set checksum and size.
  
  @param file
  @param fileStream
  @param contentType if null, try to auto-detect content type
  @throws FrameworkException
  @throws IOException