public InputStream openPath() throws IOException {
  Path filePath=Paths.get(path());
  if (Files.exists(filePath)) {
    logger.info("Opening keystore at file path {}",filePath);
    return Files.newInputStream(filePath);
  }
  URL resourceUrl=Resources.getResource(path());
  logger.info("Opening keystore at resource path {}",resourceUrl);
  return resourceUrl.openStream();
}

public InputStream openPath ( ) throws IOException { Path filePath = Paths . get ( path ( ) ) ; if ( Files . exists ( filePath ) ) { logger . info ( "Opening keystore at file path {}" , filePath ) ; return Files . newInputStream ( filePath ) ; } URL resourceUrl = Resources . getResource ( path ( ) ) ; logger . info ( "Opening keystore at resource path {}" , resourceUrl ) ; return resourceUrl . openStream ( ) ; }
if the path does not exist on the filesystem , it is resolved as a resource .
