public static int readMediumInt ( IoBuffer in ) { byte [ ] bytes = new byte [ 3 ] ; in . get ( bytes ) ; int val = 0 ; val += bytes [ 0 ] * 256 * 256 ; val += bytes [ 1 ] * 256 ; val += bytes [ 2 ] ; if ( val < 0 ) { val += 256 ; } return val ; }
Reads a Medium Int to the in buffer