Joseph her husband. Betrothal, according to the law (Deuteronomy 22:23,24), made him her husband before marriage.
A just [man]. Righteous and humane. To put her away publicly was to expose her to the penalty of death. Probably she had made her defense to him, but her story was so wonderful that he was in doubt.
Privily. Give her a bill of divorce. See Deuteronomy 24:1.