?? monitoreddiskfileitem.java
字號:
/* Licence:
* Use this however/wherever you like, just don't blame me if it breaks anything.
*
* Credit:
* If you're nice, you'll leave this bit:
*
* Class by Pierre-Alexandre Losson -- http://www.telio.be/blog
* email : plosson@users.sourceforge.net
*/
package be.telio.mediastore.ui.upload;
import org.apache.commons.fileupload.disk.DiskFileItem;
import java.io.File;
import java.io.OutputStream;
import java.io.IOException;
/**
* Created by IntelliJ IDEA.
*
* @author Original : plosson on 05-janv.-2006 10:46:33 - Last modified by $Author: plosson $ on $Date: 2006/01/05 10:09:38 $
* @version 1.0 - Rev. $Revision: 1.1 $
*/
public class MonitoredDiskFileItem extends DiskFileItem
{
private MonitoredOutputStream mos = null;
private OutputStreamListener listener;
public MonitoredDiskFileItem(String fieldName, String contentType, boolean isFormField, String fileName, int sizeThreshold, File repository, OutputStreamListener listener)
{
super(fieldName, contentType, isFormField, fileName, sizeThreshold, repository);
this.listener = listener;
}
public OutputStream getOutputStream() throws IOException
{
if (mos == null)
{
mos = new MonitoredOutputStream(super.getOutputStream(), listener);
}
return mos;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -