Mission City cafe, 2221 The Alameda. It's in Santa Clara, just outside S.J. Nice vibe, lots of students, open late.
The main library at 150 East San Fernando is awesome. Good coffee in the bottom, ample (private if you want) space in the eight floors. Open late cause it's shared with San Jose State.