code: public static <K> void storeArray(Configuration conf, K[] items,
        String keyName) throws IOException {
  
      DefaultStringifier<K> stringifier = new DefaultStringifier<K>(conf, 
          GenericsUtil.getClass(items[0]));
      try {
        StringBuilder builder = new StringBuilder();
        for (K item : items) {
          builder.append(stringifier.toString(item)).append(SEPARATOR);
        }
        conf.set(keyName, builder.toString());
      }
      finally {
        stringifier.close();
      }
    }
docs: Stores the array of items in the configuration with the given keyName.
  
  @param <K> the class of the item
  @param conf the configuration to use
  @param items the objects to be stored
  @param keyName the name of the key to use
  @throws IndexOutOfBoundsException if the items array is empty
  @throws IOException : forwards Exceptions from the underlying
  {@link Serialization} classes.