Chapter 2
Bill of Rights (ss 7-39)
35 Arrested, detained and accused persons
(2) Everyone who is detained, including every sentenced prisoner, has the right-
(d) to challenge the lawfulness of the detention in person before a court and, if
the detention is unlawful, to be released;
Rights during investigation - arbitrary arrest or detention and deprivation of liberty
EDIT.