public FileRender(String fileName) { fileName = fileName.startsWith("/") ? webRootPath + fileName : fileDownloadPath + fileName; this.file = new File(fileName); }
//3.0 这样的__________________________________________ public FileRender(File file) { if (file == null) { throw new IllegalArgumentException("file can not be null."); } this.file = file; }
public FileRender(String fileName) { if (StrKit.isBlank(fileName)) { throw new IllegalArgumentException("fileName can not be blank."); }