code: public static void writeToFile(final File fileNode, final InputStream data) throws FrameworkException, IOException {
  
  		setFileProperties(fileNode);
  
  		try (final FileOutputStream out = new FileOutputStream(fileNode.getFileOnDisk())) {
  
  			IOUtils.copy(data, out);
  		}
  	}
docs: Write binary data from FileInputStream to a file and reference the file on disk at the given file node
  
  @param fileNode
  @param data	The input stream from which to read the file data (Stream is not closed automatically - has to be handled by caller)
  @throws FrameworkException
  @throws IOException