code: @Override
      public InputStream getContentStream(Context context) throws StreamIOException {
          try {
              ContentManagerParams params = new ContentManagerParams(DSLocation);
              if (context != null ) {
                  params.setContext(context);
              }
              MIMETypedStream stream = getExternalContentManager()
                      .getExternalContent(params);
              DSSize = getContentLength(stream);
              return stream.getStream();
          } catch (Exception ex) {
              throw new StreamIOException("Error getting content stream", ex);
          }
      }
docs: Gets an InputStream to the content of this externally-referenced
  datastream.
  
  <p>The DSLocation of this datastream must be non-null before invoking
  this method.
  
  <p>If successful, the DSMIME type is automatically set based on the web
  server's response header. If the web server doesn't send a valid
  Content-type: header, as a last resort, the content-type is guessed by
  using a map of common extensions to mime-types.
  
  <p>If the content-length header is present in the response, DSSize will
  be set accordingly.
  
  @see org.fcrepo.server.storage.types.Datastream#getContentStream()