The defendant, when arrested under a warrant for an offense not bailable, must be held in custody by the Sheriff of the county in which the indictment is found or information filed, unless admitted to bail after an examination upon a writ of habeas corpus; but if the offense is bailable, there must be added to the body of the bench warrant a direction to the following effect: "Or, if he requires it, that you take him before any magistrate in that county, or in the county in which you arrest him, that he may give bail to answer to the indictment (or information);" and the Court, upon directing it to issue, must fix the amount of bail, and an indorsement must be made thereon and signed by the Clerk, to the following effect: "The defendant is to be admitted to bail in the sum of ____ dollars."
Ca. Pen. Code § 982