Whenever any person is committed to a correctional institution on any criminal accusation for want of bail, any justice of the supreme or superior court, or any person specially appointed by either of the courts, may admit him or her to bail in like manner as might have been done by the court or magistrate who committed him or her, and the supreme or superior court justices respectively shall have power to issue a writ of habeas corpus and to cause the prisoner to be brought before them, whenever it shall be necessary for the purpose expressed in this section.
R.I. Gen. Laws § 10-9-31