public static <K> void store(Configuration conf, K item, String keyName)
  throws IOException {

    DefaultStringifier<K> stringifier = new DefaultStringifier<K>(conf,
        GenericsUtil.getClass(item));
    conf.set(keyName, stringifier.toString(item));
    stringifier.close();
  }
public static < K > void store ( Configuration conf , K item , String keyName ) throws IOException { DefaultStringifier < K > stringifier = new DefaultStringifier < K > ( conf , GenericsUtil . getClass ( item ) ) ; conf . set ( keyName , stringifier . toString ( item ) ) ; stringifier . close ( ) ; }
Stores the item in the configuration with the given keyName.

@param <K>  the class of the item
@param conf the configuration to store
@param item the object to be stored
@param keyName the name of the key to use
@throws IOException : forwards Exceptions from the underlying
{@link Serialization} classes.