There was a single indictment with two counts, one for burglary in the third degree and one for grand larceny in the second degree. The judgment Avas guilty upon both counts as charged in the indictment. The court sentenced the relator to be imprisoned for the burglary in the said prison under an indeterminate sentence, the maximum to be 4 years and 5 months and the minimum 4 years, and for the grand larceny under an indeterminate sentence, the maximum to be 3 years and 1 month and the minimum 3 years, the second sentence to commence immediately upon the termination of the first.
The writ of certiorari to review a criminal case, save criminal contempt of court, is abolished ; the remedy is appeal. (Code Crim. Proc. § 515 ; Code Civ. Proc. § 2148.) A person is not entitled to writs either of habeas corpus or certiorari to inquire into the cause of his detention Avhen he is detained by virtue of a final judgment of a competent tribunal of civil or criminal jurisdiction. (Code Civ. Proc. §§ 2016-2019.)
Section 506 of the Penal Code provides as follows: “ A person who, having entered a building under such circumstances as to constitute burglary in any degree, commits any crime therein, is punishable therefor, as well as for the burglary; and may be prosecuted for each crime, separately, or in the same indictment.” We may glean from the indictment, and indeed it is not disputed, that it was laid pursuant to this section. The sentence under which the defendant is now serving was valid (Penal Code, §§ 507, 687a), and it has not expired. Hence the application for a writ to inquire under article 3 of title 2 of chapter 16 of the Code of Civil Procedure was premature. [People ex rel. Bedell v. Kinney, 24 App. Div. 309, and authorities cited; People ex rel. Trainor v. Baker, 89 N. Y. 460.)
The appeal is dismissed.
Woodward, Hooker, Gaynor and Miller, JJ., concurred.
Appeal dismissed.