Rename the usedEncoding method to documentEncoding, and make it a property.