com.fullspan.util
Class ArrayUtil

java.lang.Object
  extended bycom.fullspan.util.ArrayUtil

public class ArrayUtil
extends java.lang.Object

Static utility methods for arrays (this class has a private constructor and cannot be instantiated).

Version:
$Revision: 1.3 $, $Date: 2004/11/20 08:14:05 $
Author:
Mitch Stuart

Method Summary
static java.lang.Object arrayCopyToType(java.lang.Object srcArray, java.lang.Class type)
          Copy an array to an array of a specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

arrayCopyToType

public static java.lang.Object arrayCopyToType(java.lang.Object srcArray,
                                               java.lang.Class type)
Copy an array to an array of a specified type. Useful for converting a generic array of Objects to an array of a more specific type.

Parameters:
srcArray - the source array
type - the desired type of the new array
Returns:
a newly allocated array of the requested type. If the srcArray is null, a zero-element array is returned.