Every person confined in, sentenced to, or serving a sentence in, a city or county jail, industrial farm, or industrial road camp in this state, who commits a battery upon the person of any individual who is not himself or herself a person confined or sentenced therein, is guilty of a public offense and is subject to punishment by imprisonment pursuant to subdivision (h) of Section 1170, or in a county jail for not more than one year.
Ca. Pen. Code § 243.15