docs: private void rotateLogFiles() {
  		File[] files = getFilesList();
  		if ((files != null) && (files.length > 0)) {
  			List<File> fileList = Arrays.asList(files);
  			Collections.sort(fileList, new Comparator<File>() {
  
  				@Override
  				public int compare(File lhs, File rhs) {
  					return getLogFileIndex(lhs.getName())
  							- getLogFileIndex(rhs.getName());
  				}
  			});
  
  			int count = fileList.size();
  			for (int index = count - 1; index >= 0; index--) {
  				File file = fileList.get(index);
  				boolean isSuccess = true;
  				if (index < count - 1) {
  					File nextfile = fileList.get(index + 1);
  					// Delete the next file and rename the file with it
  					if(nextfile.exists()){
  						nextfile.delete();
  					}
  					isSuccess = file.renameTo(nextfile);
  				} else {
  					// The log file count doesn't reach maximum
  					if (count < mMaxFileCount) {
  						// Create a new file at the end
  						isSuccess = file.renameTo(new File(mDir,
  								addIndexToLogFileName(mName, index + 1)));
  					}
  				}
  				if (!isSuccess) {
  					 throw new RuntimeException("Rotating log files failed.");
  				}
  			}
  		}
  	}