public long[] asLongArray() {
        if( type == Long.TYPE ) {
            return (long[])array;
        }
        if( type == Byte.TYPE || type == Short.TYPE || type == Integer.TYPE ) {
            long[] result = new long[size];
            for( int i = 0; i < result.length; i++ ) {
                result[i] = ((Number)Array.get(array, i)).longValue();
            }
            return result;
        } 
        throw new RuntimeException("Type overflow, " + type + "[] cannot be converted to long[]");
    }