Thanks to the case of Veeck v. Southern Building Code Congress International, a group called public.resource.org has been posting various codes online for free, including all of the California 2007 Codes.
While Building Codes are Law, there's some sticky copyright issues therein. The folks who publish the codes, which are typically generated by a government agency or independent, non-profit group like the Construction Standards Institute, claim to own a copyright on the codes due to their publishing them. However, when these codes are adopted by a government, they become Law, and laws are and for the most part have always been free to copy, read, and redistribute.
While the publishers say that without the copyrights they won't have the money to publish the codes, it's a little jarring that a three-ring binder of loose-leaf, non-color, low-quality paper would cost several hundred dollars to produce. And if you want a digital copy, one you can GREP or cross-reference, well, that's more. Sometimes a lot more. And there isn't anyone else you can buy them from.
From what I understand even Libraries have to pay for the codes, so the only 'free' copy one can look at is sometimes in a single government office somewhere. And sadly, these are Laws, just real as any laws, and you can get fined or even go to jail over not following them if you're a building owner. And while most building officials are great folks, they don't have the time to explain general building codes over the phone or counter (they do rock on the specific questions however).
So, someone sued, and while the whole picture is murky, public.resource.org says that these are free for all. And so they posted them. With patriotic music, and a Seal for a seal of approval. It's so awesome, that we can only applaud them. So get to reading the very laws that effect you (because you know Congress isn't) and be an informed citizen!