The jail shall be used for the incarceration of all persons arrested for violating any laws of the state, the United States or for violating this code or any village ordinance until such person shall be lawfully brought before a judge for a hearing or until such person shall be lawfully transferred to some other place of incarceration or otherwise lawfully released. (M.C. 1963, § 10.403)