code: public static void addFileItem(final Map<String, FileItem[]> files, final String name, final FileItem item) {
  		if (files.containsKey(name)) {
  			// This field contains multiple values, append the new value to the existing values.
  			FileItem[] oldValues = files.get(name);
  			FileItem[] newValues = new FileItem[oldValues.length + 1];
  			System.arraycopy(oldValues, 0, newValues, 0, oldValues.length);
  			newValues[newValues.length - 1] = item;
  			files.put(name, newValues);
  		} else {
  			files.put(name, new FileItem[]{item});
  		}
  	}
docs: Add the file data to the files collection. If a file already exists with the given name then the value for this
  name will be an array of all registered files.
  
  @param files the map in which to store file data.
  @param name the name of the file, i.e. the key to store the file against.
  @param item the file data.