The justice shall in plain terms inform the defendant of the nature of the complaint against him of his right to counsel and, if the offense is to be presented for indictment, of his right to have a preliminary examination. He shall also inform the defendant that he is not required to make a statement and that any statement made by him may be used against him He shall provide the defendant reasonable means to communicate with an attorney or with at least one relative or other person for the purpose of obtaining counsel or arranging bail. The defendant shall not be committed to jail or removed from the county of arrest until he has had a reasonable opportunity to confer with counsel or to arrange bail. He may be detained under such security measures as the circumstances warrant. If the defendant is unable to provide bail or if the offense is unbailable, he shall be committed to jail.