code: public static void writeLong(byte[] buf, int pos, long v) {
      checkBoundary(buf, pos, 8);
      buf[pos++] = (byte) (0xff & (v >> 56));
      buf[pos++] = (byte) (0xff & (v >> 48));
      buf[pos++] = (byte) (0xff & (v >> 40));
      buf[pos++] = (byte) (0xff & (v >> 32));
      buf[pos++] = (byte) (0xff & (v >> 24));
      buf[pos++] = (byte) (0xff & (v >> 16));
      buf[pos++] = (byte) (0xff & (v >> 8));
      buf[pos] = (byte) (0xff & v);
    }
docs: Writes a specific long value (8 bytes) to the output byte array at the given offset.
  
  @param buf output byte array
  @param pos offset into the byte buffer to write
  @param v long value to write