question: public Number readNumber ( Type target ) { double num = buf . getDouble ( ) ; if ( num == Math . round ( num ) ) { if ( num < Integer . MAX_VALUE ) { return ( int ) num ; } else { return Math . round ( num ) ; } } else { return num ; } }
target:  Reads a Number. In ActionScript 1 and 2 Number type represents all numbers, both floats and integers.