In a proceeding before a court or magistrate for the investigation or prosecution of a criminal offense, the court or magistrate may order any witness appearing before such court or magistrate to enter into a sufficient recognizance with surety for his or her appearance before any court or magistrate where his or her attendance in such investigation or prosecution is necessary. If the witness refuses to enter into such recognizance with surety, he or she may be committed to jail in the county where his or her attendance as a witness is required, on a warrant of the court or magistrate making the order, and there detained until such time as his or her attendance to testify is required.
13 V.S.A. § 6605