‘Will do what is necessary’ to protect energy supplies, says China on Mideast conflict