org.zht.framework.exception.FileNameLengthLimitExceededException.java Source code

Java tutorial

Introduction

Here is the source code for org.zht.framework.exception.FileNameLengthLimitExceededException.java

Source

/**
 * Copyright (c) 2015 https://github.com/zhaohuatai
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.zht.framework.exception;

import org.apache.commons.fileupload.FileUploadException;

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;
    }

}