@Test public void openResourceStream_FROM_CLASSPATH() throws IOException { InputStream inputStream = ResourceUtils.openResourceStream("classpath:/pl/edu/icm/cermine/tools/resourceFile.txt"); assertResourceContent(inputStream); }
public static InputStream openResourceStream(String resourcePath) throws IOException { if (StringUtils.startsWith(resourcePath, CLASSPATH_RESOURCE_PREFIX)) { InputStream inputStream = ResourceUtils.class.getResourceAsStream(resourcePath.substring(CLASSPATH_RESOURCE_PREFIX.length())); return inputStream; } return new FileInputStream(resourcePath); }
ResourceUtils { public static InputStream openResourceStream(String resourcePath) throws IOException { if (StringUtils.startsWith(resourcePath, CLASSPATH_RESOURCE_PREFIX)) { InputStream inputStream = ResourceUtils.class.getResourceAsStream(resourcePath.substring(CLASSPATH_RESOURCE_PREFIX.length())); return inputStream; } return new FileInputStream(resourcePath); } }
ResourceUtils { public static InputStream openResourceStream(String resourcePath) throws IOException { if (StringUtils.startsWith(resourcePath, CLASSPATH_RESOURCE_PREFIX)) { InputStream inputStream = ResourceUtils.class.getResourceAsStream(resourcePath.substring(CLASSPATH_RESOURCE_PREFIX.length())); return inputStream; } return new FileInputStream(resourcePath); }  }
ResourceUtils { public static InputStream openResourceStream(String resourcePath) throws IOException { if (StringUtils.startsWith(resourcePath, CLASSPATH_RESOURCE_PREFIX)) { InputStream inputStream = ResourceUtils.class.getResourceAsStream(resourcePath.substring(CLASSPATH_RESOURCE_PREFIX.length())); return inputStream; } return new FileInputStream(resourcePath); }  static InputStream openResourceStream(String resourcePath); }
ResourceUtils { public static InputStream openResourceStream(String resourcePath) throws IOException { if (StringUtils.startsWith(resourcePath, CLASSPATH_RESOURCE_PREFIX)) { InputStream inputStream = ResourceUtils.class.getResourceAsStream(resourcePath.substring(CLASSPATH_RESOURCE_PREFIX.length())); return inputStream; } return new FileInputStream(resourcePath); }  static InputStream openResourceStream(String resourcePath);  }