public static GCSObject getGCSObjectFromFullPath()

in spanner-data-validator-java/src/main/java/com/google/migration/Helpers.java [383:400]


  public static GCSObject getGCSObjectFromFullPath(String fullPath) {
    try {
      URI uri = new URI(fullPath);
      if(uri.getScheme().equals("gs")) {
        String objectName = uri.getPath();
        if(objectName.startsWith("/")) {
          objectName = objectName.substring(1);
        }
        return new GCSObject(uri.getHost(), objectName);
      }

      return null;
    } catch (URISyntaxException ex) {
      return null;
    } catch(Exception e) {
      return null;
    }
  }