Blame view

src/main/java/com/huaheng/common/exception/file/FileNameLengthLimitExceededException.java 900 Bytes
tangying authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.huaheng.common.exception.file;

import org.apache.commons.fileupload.FileUploadException;

/**
 * 文件名超长 误异常类
 * 
 * @author huaheng
 */
public class FileNameLengthLimitExceededException extends FileUploadException
{

    private static final long serialVersionUID = 1L;
    private int length;
    private int maxLength;
    private String filename;

    public FileNameLengthLimitExceededException(String filename, int length, int maxLength)
    {
        super("file name : [" + filename + "], length : [" + length + "], max length : [" + maxLength + "]");
        this.length = length;
        this.maxLength = maxLength;
        this.filename = filename;
    }

    public String getFilename()
    {
        return filename;
    }

    public int getLength()
    {
        return length;
    }

    public int getMaxLength()
    {
        return maxLength;
    }

}