See here, 1. How David was abused even by great men, who should have
known better his character and his case, and have been more generous:
Princes did sit, sit in council, sit in judgment, and speak against me.
What even princes say is not always right; but it is sad when judgment
is thus turned to wormwood, when those that should be the protectors of
the innocent are their betrayers. Herein David was a type of Christ,
for they were the princes of this world that vilified and crucified the
Lord of glory, 1 Cor. ii. 8. 2. What method he took to make himself
easy under these abuses: he meditated in God's statutes, went on in his
duty, and did not regard them; as a deaf man, he heard not. When they
spoke against him, he found that in the word of God which spoke for
him, and spoke comfort to him, and then none of these things moved him.
Those that have pleasure in communion with God may easily despise the
censures of men, even of princes.