code: protected String getFileName(String fileName) {
          int index = fileName.lastIndexOf('.');
          return (index == -1) ? fileName : fileName.substring(0, index);
      }
docs: /*
  Returns file name without the extension.