Are the contents of a will private?

Once a will is filed in the court it becomes a public document and anyone can view the will on payment of a small fee to the court.