code: public static InputStream getResourceAsStream(UimaContext context, String name)
        throws ResourceInitializationException {
  
      InputStream inResource = getOptionalResourceAsStream(context, name);
  
      if (inResource == null) {
        throw new ResourceInitializationException(
            ExceptionMessages.MESSAGE_CATALOG,
            ExceptionMessages.IO_ERROR_MODEL_READING, new Object[] { name
                + " could not be found!" });
      }
  
      return inResource;
    }
docs: Retrieves a resource as stream from the given context.
  
  @param context
  @param name
  @return the stream
  
  @throws ResourceInitializationException