public static void writeDouble(RandomAccessOutput byteStream, double d) {
    long v = Double.doubleToLongBits(d);
    byteStream.write((byte) (v >> 56));
    byteStream.write((byte) (v >> 48));
    byteStream.write((byte) (v >> 40));
    byteStream.write((byte) (v >> 32));
    byteStream.write((byte) (v >> 24));
    byteStream.write((byte) (v >> 16));
    byteStream.write((byte) (v >> 8));
    byteStream.write((byte) (v));
  }
Write a zero-compressed encoded long to a byte array.

@param bytes
         the byte array/stream
@param l
         the long
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryUtils.java