public static < K > K [ ] loadArray ( Configuration conf , String keyName , Class < K > itemClass ) throws IOException { DefaultStringifier < K > stringifier = new DefaultStringifier < K > ( conf , itemClass ) ; try { String itemStr = conf . get ( keyName ) ; ArrayList < K > list = new ArrayList < K > ( ) ; String [ ] parts = itemStr . split ( SEPARATOR ) ; for ( String part : parts ) { if ( ! part . equals ( "" ) ) list . add ( stringifier . fromString ( part ) ) ; } return GenericsUtil . toArray ( itemClass , list ) ; } finally { stringifier . close ( ) ; } }
Restores the array of objects from the configuration .