Moved method encodeContent to the BaseConnectorService class.