com.cloudy.common.web.upload.exception.FileNameLengthLimitExceededException.java Source code

Java tutorial

Introduction

Here is the source code for com.cloudy.common.web.upload.exception.FileNameLengthLimitExceededException.java

Source

/**
 * Copyright (c) 2005-2012 https://github.com/zhangkaitao
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package com.cloudy.common.web.upload.exception;

import org.apache.commons.fileupload.FileUploadException;

/**
 * ??
 * <p>User: Zhang Kaitao
 * <p>Date: 13-3-8 ?8:44
 * <p>Version: 1.0
 */
public class FileNameLengthLimitExceededException extends FileUploadException {

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

}