public List<Integer> readListOfIntegers(DataInput in) throws IOException {
  int size=InternalDataSerializer.readArrayLength(in);
  if (size > 0) {
    List<Integer> list=new ArrayList<Integer>(size);
    for (int i=0; i < size; i++) {
      list.add(Integer.valueOf(in.readInt()));
    }
    return list;
  }
 else   if (size == 0) {
    return Collections.<Integer>emptyList();
  }
 else {
    return null;
  }
}

public List < Integer > readListOfIntegers ( DataInput in ) throws IOException { int size = InternalDataSerializer . readArrayLength ( in ) ; if ( size > 0 ) { List < Integer > list = new ArrayList < Integer > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { list . add ( Integer . valueOf ( in . readInt ( ) ) ) ; } return list ; } else if ( size == 0 ) { return Collections . < Integer > emptyList ( ) ; } else { return null ; } }
reads a list of integers serialized by writelistofintegers . this will return null if the object serialized by writelistofintegers was null .
