static public byte [ ] asBytes ( int value ) { if ( 0 > value ) { throw new IllegalArgumentException ( "value cannot be less than zero" ) ; } byte [ ] result = new byte [ 4 ] ; result [ 0 ] = ( byte ) ( ( value >>> 24 ) & 0xFF ) ; result [ 1 ] = ( byte ) ( ( value >>> 16 ) & 0xFF ) ; result [ 2 ] = ( byte ) ( ( value >>> 8 ) & 0xFF ) ; result [ 3 ] = ( byte ) ( ( value ) & 0xFF ) ; return result ; }
Returns an array of 4 bytes that represent the integer .