public static String parseSegmentName(String filename){
  int idx=indexOfSegmentName(filename);
  if (idx != -1) {
    filename=filename.substring(0,idx);
  }
  return filename;
}

public static String parseSegmentName ( String filename ) { int idx = indexOfSegmentName ( filename ) ; if ( idx != - 1 ) { filename = filename . substring ( 0 , idx ) ; } return filename ; }
parses the segment name out of the given file name .
