{
    String platformResourcePath = uri.toPlatformString(true);
    if (workspaceRoot != null)
    {
      return WorkbenchHelper.createPlatformResourceInputStream(platformResourcePath, options);
    }
    else
    {
      URI resolvedLocation = EcorePlugin.resolvePlatformResourcePath(platformResourcePath);
      if (resolvedLocation != null)
      {
        return getURIConverter(options).createInputStream(resolvedLocation, options);
      }

      throw new IOException("The path '" + platformResourcePath + "' is unmapped");
    }
  }