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