/**
  * Validates that an implementation of IStreamProvider2 exists and
  * load it.
  * 
  * @return void
  * 
  * @throws ODataException
  */
 private function _loadAndValidateStreamProvider2()
 {
     $maxServiceVersion = $this->_service->getConfiguration()->getMaxDataServiceVersion();
     if ($maxServiceVersion->compare(new Version(3, 0)) < 0) {
         throw ODataException::createInternalServerError(Messages::streamProviderWrapperMaxProtocolVersionMustBeV3OrAboveToSupportNamedStreams());
     }
     if (is_null($this->_streamProvider)) {
         $this->_loadStreamProvider();
         if (is_null($this->_streamProvider)) {
             throw ODataException::createInternalServerError(Messages::streamProviderWrapperMustImplementStreamProvider2ToSupportNamedStreams());
         } else {
             if (!$this->_streamProvider instanceof IStreamProvider2) {
                 throw ODataException::createInternalServerError(Messages::streamProviderWrapperInvalidStream2Instance());
             }
         }
     }
 }