Depends on your zoning. :D
so... find your zoning Here
The link in case that doesn't work;
This is the zoning atlas for Santa Clara County as of 2012. There are nearly three hundred pages, it goes in order as if you were scrolling left to right and top to bottom going North to South. We're further south, so it took some patience to get to the practically second to last page.
The zones will be A, AR, HS, RR for rural and R1, R1E, RHS, R1S, R3S, R2 and R3 for urban. The map is color coded and city names and their boundaries are in red and black.
Then you go to the Zoning Ordinance and look up the laws specifically pertaining to your zoning. Here
or copy and paste
This is another long read, but SO AMAZING INFORMATIONAL!!! Even just for what regulations apply to what property uses.
Your zoning determines whether you can have outbuildings related to use and what use you have rights to and within what limitations. For example if you are in the city proper, no quacking ducks and no roosters. If you're zoned Urban (R1, etc.) you have a whole different set of restrictions than someone who is in an agricultural zone - someone zoned A has different "rights" than someone zoned AR.
Fences are talked about
and stock limitations Here
Depending on your zoning and city - San Jose proper, or a surrounding city makes a difference.
Here's an article in the mercury pertaining specifically to San Jose, and it is in alignment with the 6 hens, so it looks like that is probably correct, but I would look it up in the San Jose Code of Ordinances - https://www.municode.com/library/ca/san_jose/codes/code_of_ordinances?nodeId=TIT17BUCO for conflicts, although it appears any references point you to the County Zoning Code
A lot of it wont apply to you if you're in the Urban zones, but the rules for building when making use of your property are laid out right down to the letter. The city sections are closer to the end. Happy reading to you. I promise, it's way more fun than it sounds. :D
Edited by HnkyDnkyZZFarm - 1/31/16 at 4:51pm