All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.zhengframework.configuration.io.ProvidedURLLocationStrategy Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.github.zhengframework.configuration.io;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Optional;

public class ProvidedURLLocationStrategy implements FileLocationStrategy {

  @Override
  public Optional locate(FileSystem fileSystem, FileLocator locator) {
    try {
      return Optional.of(new URL(locator.getSourceURL()));
    } catch (MalformedURLException e) {
      return Optional.empty();
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy