public static URI datastorePathToUri(String path){
  if (path == null) {
    return null;
  }
  int i=path.indexOf("] ");
  if (i <= 0) {
    throw new IllegalArgumentException("Invalid datastore path " + path);
  }
  String dsName=path.substring(1,i);
  String pathOnly=path.substring(i + 2);
  return URI.create(SCHEME_DATASTORE + "://" + dsName+ "/"+ stripLeadingSlashes(pathOnly));
}

public static URI datastorePathToUri ( String path ) { if ( path == null ) { return null ; } int i = path . indexOf ( "] " ) ; if ( i <= 0 ) { throw new IllegalArgumentException ( "Invalid datastore path " + path ) ; } String dsName = path . substring ( 1 , i ) ; String pathOnly = path . substring ( i + 2 ) ; return URI . create ( SCHEME_DATASTORE + "://" + dsName + "/" + stripLeadingSlashes ( pathOnly ) ) ; }
convert a string [ dsname ] / path / to / file into a uri datastore : / / dsname / path / to / file .
