static public int doubleToBytes ( double s , byte [ ] buffer , int index ) { long bits = Double . doubleToRawLongBits ( s ) ; int length = longToBytes ( bits , buffer , index ) ; return length ; }
This function converts a double into its corresponding byte format and inserts it into the specified buffer at the specified index .