44-1-16. [When petitioner will be remanded to custody.]
The officer shall forthwith remand such party, if it appears that he is detained in custody, either:
A. by virtue of process issued by any court or judge of the United States in a case where such court or judge has exclusive jurisdiction; or
B. by virtue of the final judgment or decree of any competent court, or of any execution issued upon such judgment or decree; or
C. for any contempt, specially and plainly charged in the commitment by some court, officer or body having authority to commit for the contempt so charged; and
D. that the time during which such party may be legally detained has not expired.