public ByteVector putLong ( final long longValue ) { int currentLength = length ; if ( currentLength + 8 > data . length ) { enlarge ( 8 ) ; } byte [ ] currentData = data ; int intValue = ( int ) ( longValue >>> 32 ) ; currentData [ currentLength ++ ] = ( byte ) ( intValue >>> 24 ) ; currentData [ currentLength ++ ] = ( byte ) ( intValue >>> 16 ) ; currentData [ currentLength ++ ] = ( byte ) ( intValue >>> 8 ) ; currentData [ currentLength ++ ] = ( byte ) intValue ; intValue = ( int ) longValue ; currentData [ currentLength ++ ] = ( byte ) ( intValue >>> 24 ) ; currentData [ currentLength ++ ] = ( byte ) ( intValue >>> 16 ) ; currentData [ currentLength ++ ] = ( byte ) ( intValue >>> 8 ) ; currentData [ currentLength ++ ] = ( byte ) intValue ; length = currentLength ; return this ; }
Puts a long into this byte vector . The byte vector is automatically enlarged if necessary .