mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -13,5 +13,5 @@ public enum FtpMode {
|
||||
/** 主动模式 */
|
||||
Active,
|
||||
/** 被动模式 */
|
||||
Passive;
|
||||
Passive
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ public enum GlobalMailAccount {
|
||||
/**
|
||||
* 构造
|
||||
*/
|
||||
private GlobalMailAccount() {
|
||||
GlobalMailAccount() {
|
||||
mailAccount = createDefaultAccount();
|
||||
}
|
||||
|
||||
|
@@ -1,14 +1,13 @@
|
||||
package cn.hutool.extra.mail;
|
||||
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.setting.Setting;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Properties;
|
||||
|
||||
import cn.hutool.core.lang.Console;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.setting.Setting;
|
||||
|
||||
/**
|
||||
* 邮件账户对象
|
||||
*
|
||||
|
@@ -68,7 +68,7 @@ public class UploadFile {
|
||||
* 写入后原临时文件会被删除
|
||||
* @param destPath 目标文件路径
|
||||
* @return 目标文件
|
||||
* @throws IOException
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
public File write(String destPath) throws IOException {
|
||||
if(data != null || tempFile != null) {
|
||||
@@ -100,12 +100,9 @@ public class UploadFile {
|
||||
return destination;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content of file upload item.
|
||||
*/
|
||||
/**
|
||||
* @return 获得文件字节流
|
||||
* @throws IOException
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
public byte[] getFileContent() throws IOException {
|
||||
assertValid();
|
||||
@@ -121,7 +118,7 @@ public class UploadFile {
|
||||
|
||||
/**
|
||||
* @return 获得文件流
|
||||
* @throws IOException
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
public InputStream getFileInputStream() throws IOException {
|
||||
assertValid();
|
||||
@@ -179,7 +176,7 @@ public class UploadFile {
|
||||
* 处理上传表单流,提取出文件
|
||||
*
|
||||
* @param input 上传表单的流
|
||||
* @throws IOException
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
protected boolean processStream(MultipartRequestInputStream input) throws IOException {
|
||||
if (!isAllowedExtension()) {
|
||||
@@ -260,7 +257,7 @@ public class UploadFile {
|
||||
|
||||
/**
|
||||
* 断言是否文件流可用
|
||||
* @throws IOException
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
private void assertValid() throws IOException {
|
||||
if(! isUploaded()) {
|
||||
|
@@ -34,7 +34,7 @@ public enum ChannelType {
|
||||
*
|
||||
* @param value 类型值
|
||||
*/
|
||||
private ChannelType(String value) {
|
||||
ChannelType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
@@ -429,12 +429,12 @@ public class Sftp extends AbstractFtp {
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
public static enum Mode {
|
||||
public enum Mode {
|
||||
/** 完全覆盖模式,这是JSch的默认文件传输模式,即如果目标文件已经存在,传输的文件将完全覆盖目标文件,产生新的文件。 */
|
||||
OVERWRITE,
|
||||
/** 恢复模式,如果文件已经传输一部分,这时由于网络或其他任何原因导致文件传输中断,如果下一次传输相同的文件,则会从上一次中断的地方续传。 */
|
||||
RESUME,
|
||||
/** 追加模式,如果目标文件已存在,传输的文件将在目标文件后追加。 */
|
||||
APPEND;
|
||||
APPEND
|
||||
}
|
||||
}
|
||||
|
@@ -132,7 +132,7 @@ public class TemplateConfig implements Serializable {
|
||||
*
|
||||
* @author looly
|
||||
*/
|
||||
public static enum ResourceMode {
|
||||
public enum ResourceMode {
|
||||
/** 从ClassPath加载模板 */
|
||||
CLASSPATH,
|
||||
/** 从File目录加载模板 */
|
||||
@@ -142,7 +142,7 @@ public class TemplateConfig implements Serializable {
|
||||
/** 从模板文本加载模板 */
|
||||
STRING,
|
||||
/** 复合加载模板(分别从File、ClassPath、Web-root、String方式尝试查找模板) */
|
||||
COMPOSITE;
|
||||
COMPOSITE
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -185,5 +185,5 @@ public class TemplateConfig implements Serializable {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user