public static List<Integer> arrayToList(int[] array, int codeLen) {
        List<Integer> result = new ArrayList<>();
        for (int x = 0; x < codeLen; x++) {
            result.add(array[x]);
        }
        return result;
    }
public static List < Integer > arrayToList ( int [ ] array , int codeLen ) { List < Integer > result = new ArrayList < > ( ) ; for ( int x = 0 ; x < codeLen ; x ++ ) { result . add ( array [ x ] ) ; } return result ; }
This method is used only for VocabCache compatibility purposes
@param array
@param codeLen
@return