?? uploadfilehandler.java
字號:
/*
* UploadFileHandler.java
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Author: Winter Lau (javayou@gmail.com)
* http://dlog4j.sourceforge.net
*/
package com.liusoft.dlog4j.upload;
import java.io.File;
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.liusoft.dlog4j.base.FckUploadFileBeanBase;
/**
* 上傳后的文件處理接口
* @author Winter Lau
*/
public interface UploadFileHandler {
/**
* 初始化文件處理接口
* @param config
*/
public void init(ServletConfig config);
/**
* 保存上傳后的文件并返回該文件對應(yīng)的URL地址
* 子類必須設(shè)置圖片的存儲路徑,例如
* req.setAttribute("file.path", newFile);
* @param file
* @return
* @throws Exception
*/
public String save(HttpServletRequest req, HttpServletResponse res, File file) throws Exception;
/**
* 刪除一個上傳文件的信息
* @param fbean
* @return
* @throws Exception
*/
public boolean remove(FckUploadFileBeanBase fbean) throws Exception;
/**
* 退出
*/
public void destroy();
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -