public static InputStream getOptionalResourceAsStream(UimaContext context,
String name) throws ResourceInitializationException {
try {
return context.getResourceAsStream(name);
} catch (ResourceAccessException e) {
throw new ResourceInitializationException(
ResourceInitializationException.STANDARD_MESSAGE_CATALOG,
new Object[] { "There is an internal error in the UIMA SDK: " +
e.getMessage(),
e });
}