The electric vehicle (EV) can be utilized as a dynamically configurable dispersed energy storage in the vehicle-to-grid (V2G) and vehicle-to-building (V2B) operation mode to balance the energy demand between buildings and EVs. This paper proposes a mixed integer linear programming based collaborative decision model to study the energy sharing between a building and an EV charging station (CS). The building has its distributed generator, and electric and thermal energy storage, and the CS has its own renewable energy source. To model the V2G/V2B integration, we introduce three sets of decision variables to represent the energy exchange among building, CS and power grid. A set of parameters are introduced to model the driver behaviors, such as initial and desired state of charge level of EV battery, and available hours of EV, and sixteen different building categories (e.g., office, restaurant, hotel, warehouse, etc.) are studied. The impacts of driver behaviors and building categories on the economic performance of V2G/V2B integration are characterized and analyzed. The results from this research can recommend best V2G/V2B integration considering various driver behaviors and building categories which can provide valuable insight for smart community design.