public static int putInt ( byte [ ] bytes , int offset , int val ) { if ( bytes . length - offset < SIZEOF_INT ) { throw new IllegalArgumentException ( "Not enough room to put an int at" + " offset " + offset + " in a " + bytes . length + " byte array" ) ; } for ( int i = offset + 3 ; i > offset ; i -- ) { bytes [ i ] = ( byte ) val ; val >>>= 8 ; } bytes [ offset ] = ( byte ) val ; return offset + SIZEOF_INT ; }
Put an int value out to the specified byte array position .