首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库 | 站长工具
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>jsp教程>资讯:Jsp页面实现文件上传下载

Jsp页面实现文件上传下载

www.jz123.cn  2008-09-02   来源:   中国建站    袁袁整理    我要投递新闻


            }
            if ( zipDelFlag ){
                File fToDel = new File(filepath);
                fToDel.delete();
            }
        }catch(IOException e){
            return IO_EXCEPTION;
        }finally{
            try{
                if ( inStream != null ){
                    inStream.close();
                    inStream = null;
                }
                if ( zos != null ){
                    zos.close();
                    zos = null;
                }
                if ( is != null ){
                    is.close();
                    is = null;
                }
            }catch (IOException e){
            }
        }
        return status;
    }
   
    /**
     * pre check.
     * @return
     */
    private int preCheck(){
       
        if ( response == null )
            return RESPONSE_IS_NULL;
           
        if ( disFileName == null || disFileName.trim().length() == 0 )
            return UNSET_DIS_FILE_NAME;
        if ( fileType == -1 )
            return UNSET_DOWNLOADTYPE;
        else if ( fileType == 0 ){
            if ( downFileName == null || downFileName.trim().length() == 0 )
                return UNSET_DOWN_FILE_NAME;
            else{
                if ( !isFile( downFileName ) )
                    return UNSET_DOWN_FILE_NAME;
            }
           
        }else if ( fileType == 1 ){
            if ( zipFilePath == null || zipFilePath.length() == 0 )
                return UNSET_DOWN_FILE_NAME;
            else{
                if ( !isDirect(zipFilePath) )
                    return UNSET_DOWN_FILE_NAME;
            }
            if ( zipFileNames == null || zipFileNames.length == 0 )

上一篇:JSP网站开发环境的目录结构标准 下一篇:Jsp常用功能:CSV文件的生成与分析

评论总数:2 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图