private static InputStream getStreamFromClassPath(
      final String normalizedPath) {
    InputStream dictInputStream = null;
    final String[] dictPaths = normalizedPath.split("src/main/resources");
    if (dictPaths.length == 2) {
      dictInputStream = IOUtils.class.getClassLoader()
          .getResourceAsStream(dictPaths[1]);
    } else {
      final String[] windowsPaths = normalizedPath
          .split("src\\\\main\\\\resources\\\\");
      if (windowsPaths.length == 2) {
        dictInputStream = IOUtils.class.getClassLoader()
            .getResourceAsStream(windowsPaths[1]);
      }
    }
    return dictInputStream;
  }
private static InputStream getStreamFromClassPath ( final String normalizedPath ) { InputStream dictInputStream = null ; final String [ ] dictPaths = normalizedPath . split ( "src/main/resources" ) ; if ( dictPaths . length == 2 ) { dictInputStream = IOUtils . class . getClassLoader ( ) . getResourceAsStream ( dictPaths [ 1 ] ) ; } else { final String [ ] windowsPaths = normalizedPath . split ( "src\\\\main\\\\resources\\\\" ) ; if ( windowsPaths . length == 2 ) { dictInputStream = IOUtils . class . getClassLoader ( ) . getResourceAsStream ( windowsPaths [ 1 ] ) ; } } return dictInputStream ; }
Load a resource from the classpath.

@param normalizedPath
the path normalized using {@code Paths} functions.
@return the input stream of the resource