class DefaultEntityResolver2 implements EntityResolver2 {

  protected InputSource getClassPathInputSource(final String publicId, final String systemId,
      final String path) {
    final InputStream stream = ClassPathLoader.getLatest().getResourceAsStream(getClass(), path);
    if (null == stream) {
      return null;
    }

    final InputSource inputSource = new InputSource(stream);
    inputSource.setPublicId(publicId);
    inputSource.setSystemId(systemId);

    return inputSource;
  }

}