code: public static boolean isSegmentFile(String name, File file) {
      Assert.notNull(name, "name");
      Assert.notNull(file, "file");
      String fileName = file.getName();
      if (fileName.lastIndexOf(EXTENSION_SEPARATOR) == -1 || fileName.lastIndexOf(PART_SEPARATOR) == -1 || fileName.lastIndexOf(EXTENSION_SEPARATOR) < fileName.lastIndexOf(PART_SEPARATOR) || !fileName.endsWith(EXTENSION))
        return false;
  
      for (int i = fileName.lastIndexOf(PART_SEPARATOR) + 1; i < fileName.lastIndexOf(EXTENSION_SEPARATOR); i++) {
        if (!Character.isDigit(fileName.charAt(i))) {
          return false;
        }
      }
  
      if (fileName.lastIndexOf(PART_SEPARATOR, fileName.lastIndexOf(PART_SEPARATOR) - 1) == -1)
        return false;
  
      for (int i = fileName.lastIndexOf(PART_SEPARATOR, fileName.lastIndexOf(PART_SEPARATOR) - 1) + 1; i < fileName.lastIndexOf(PART_SEPARATOR); i++) {
        if (!Character.isDigit(fileName.charAt(i))) {
          return false;
        }
      }
  
      return fileName.substring(0, fileName.lastIndexOf(PART_SEPARATOR, fileName.lastIndexOf(PART_SEPARATOR) - 1)).equals(name);
    }
docs: Returns a boolean value indicating whether the given file appears to be a parsable segment file.
  
  @throws NullPointerException if {@code file} is null