public static String extractDataRoot(String publicURL,String accessURL){
  String reminder=publicURL.substring(accessURL.length() + 1);
  String container=null;
  if (reminder.indexOf("/") > 0) {
    container=reminder.substring(0,reminder.indexOf("/"));
  }
 else {
    container=reminder;
  }
  if (container.endsWith("/")) {
    container=container.substring(0,container.length() - 1);
  }
  return container;
}

public static String extractDataRoot ( String publicURL , String accessURL ) { String reminder = publicURL . substring ( accessURL . length ( ) + 1 ) ; String container = null ; if ( reminder . indexOf ( "/" ) > 0 ) { container = reminder . substring ( 0 , reminder . indexOf ( "/" ) ) ; } else { container = reminder ; } if ( container . endsWith ( "/" ) ) { container = container . substring ( 0 , container . length ( ) - 1 ) ; } return container ; }
extracts container name from http : / / hostname / v1 / auth_id / container / object
