public static String parseVolumeHostDirectory(String volume){
  if (StringUtils.isEmpty(volume)) {
    return volume;
  }
  if (!volume.contains(HOST_CONTAINER_DIR_DELIMITER)) {
    return volume;
  }
  String[] hostContainerDir=volume.split(HOST_CONTAINER_DIR_DELIMITER);
  if (hostContainerDir.length != 2) {
    throw new IllegalArgumentException("Invalid volume directory.");
  }
  String hostDir=hostContainerDir[0];
  return hostDir;
}

public static String parseVolumeHostDirectory ( String volume ) { if ( StringUtils . isEmpty ( volume ) ) { return volume ; } if ( ! volume . contains ( HOST_CONTAINER_DIR_DELIMITER ) ) { return volume ; } String [ ] hostContainerDir = volume . split ( HOST_CONTAINER_DIR_DELIMITER ) ; if ( hostContainerDir . length != 2 ) { throw new IllegalArgumentException ( "Invalid volume directory." ) ; } String hostDir = hostContainerDir [ 0 ] ; return hostDir ; }
parses volume host directory only .
