亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? smartupload.jad

?? JSP開發的學生信息管理系統
?? JAD
?? 第 1 頁 / 共 2 頁
字號:
// Decompiled by DJ v2.5.5.45 Copyright 2000 Atanas Neshkov  Date: 2003-9-13 17:37:35
// Home Page : http//members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   SmartUpload.java

package com.jspsmart.upload;

import java.io.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;

// Referenced classes of package com.jspsmart.upload:
//            Files, Request, SmartUploadException, File

public class SmartUpload
{

    public SmartUpload()
    {
        m_totalBytes = 0;
        m_currentIndex = 0;
        m_startData = 0;
        m_endData = 0;
        m_boundary = new String();
        m_totalMaxFileSize = 0L;
        m_maxFileSize = 0L;
        m_deniedFilesList = new Vector();
        m_allowedFilesList = new Vector();
        m_denyPhysicalPath = false;
        m_forcePhysicalPath = false;
        m_contentDisposition = new String();
        m_files = new Files();
        m_formRequest = new Request();
    }

    public final void init(ServletConfig config)
        throws ServletException
    {
        m_application = config.getServletContext();
    }

    public void service(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
    {
        m_request = request;
        m_response = response;
    }

    public final void initialize(ServletConfig config, HttpServletRequest request, HttpServletResponse response)
        throws ServletException
    {
        m_application = config.getServletContext();
        m_request = request;
        m_response = response;
    }

    public final void initialize(PageContext pageContext)
        throws ServletException
    {
        m_application = pageContext.getServletContext();
        m_request = (HttpServletRequest)pageContext.getRequest();
        m_response = (HttpServletResponse)pageContext.getResponse();
    }

    public final void initialize(ServletContext application, HttpSession session, HttpServletRequest request, HttpServletResponse response, JspWriter out)
        throws ServletException
    {
        m_application = application;
        m_request = request;
        m_response = response;
    }

    public void upload()
        throws SmartUploadException, IOException, ServletException
    {
        int totalRead = 0;
        int readBytes = 0;
        long totalFileSize = 0L;
        boolean found = false;
        String dataHeader = new String();
        String fieldName = new String();
        String fileName = new String();
        String fileExt = new String();
        String filePathName = new String();
        String contentType = new String();
        String contentDisp = new String();
        String typeMIME = new String();
        String subTypeMIME = new String();
        boolean isFile = false;
        m_totalBytes = m_request.getContentLength();
        m_binArray = new byte[m_totalBytes];
        for(; totalRead < m_totalBytes; totalRead += readBytes)
            try
            {
                m_request.getInputStream();
                readBytes = m_request.getInputStream().read(m_binArray, totalRead, m_totalBytes - totalRead);
            }
            catch(Exception e)
            {
                throw new SmartUploadException("Unable to upload.");
            }

        for(; !found && m_currentIndex < m_totalBytes; m_currentIndex++)
            if(m_binArray[m_currentIndex] == 13)
                found = true;
            else
                m_boundary = m_boundary + (char)m_binArray[m_currentIndex];

        if(m_currentIndex == 1)
            return;
        m_currentIndex++;
        do
        {
            if(m_currentIndex >= m_totalBytes)
                break;
            dataHeader = getDataHeader();
            m_currentIndex = m_currentIndex + 2;
            isFile = dataHeader.indexOf("filename") > 0;
            fieldName = getDataFieldValue(dataHeader, "name");
            if(isFile)
            {
                filePathName = getDataFieldValue(dataHeader, "filename");
                fileName = getFileName(filePathName);
                fileExt = getFileExt(fileName);
                contentType = getContentType(dataHeader);
                contentDisp = getContentDisp(dataHeader);
                typeMIME = getTypeMIME(contentType);
                subTypeMIME = getSubTypeMIME(contentType);
            }
            getDataSection();
            if(isFile && fileName.length() > 0)
            {
                if(m_deniedFilesList.contains(fileExt))
                    throw new SecurityException("The extension of the file is denied to be uploaded (1015).");
                if(!m_allowedFilesList.isEmpty() && !m_allowedFilesList.contains(fileExt))
                    throw new SecurityException("The extension of the file is not allowed to be uploaded (1010).");
                if(m_maxFileSize > (long)0 && (long)((m_endData - m_startData) + 1) > m_maxFileSize)
                    throw new SecurityException(String.valueOf((new StringBuffer("Size exceeded for this file : ")).append(fileName).append(" (1105).")));
                totalFileSize += (m_endData - m_startData) + 1;
                if(m_totalMaxFileSize > (long)0 && totalFileSize > m_totalMaxFileSize)
                    throw new SecurityException("Total File Size exceeded (1110).");
            }
            if(isFile)
            {
                com.jspsmart.upload.File newFile = new com.jspsmart.upload.File();
                newFile.setParent(this);
                newFile.setFieldName(fieldName);
                newFile.setFileName(fileName);
                newFile.setFileExt(fileExt);
                newFile.setFilePathName(filePathName);
                newFile.setIsMissing(filePathName.length() == 0);
                newFile.setContentType(contentType);
                newFile.setContentDisp(contentDisp);
                newFile.setTypeMIME(typeMIME);
                newFile.setSubTypeMIME(subTypeMIME);
                if(contentType.indexOf("application/x-macbinary") > 0)
                    m_startData = m_startData + 128;
                newFile.setSize((m_endData - m_startData) + 1);
                newFile.setStartData(m_startData);
                newFile.setEndData(m_endData);
                m_files.addFile(newFile);
            } else
            {
                String value = new String(m_binArray, m_startData, (m_endData - m_startData) + 1);
                m_formRequest.putParameter(fieldName, value);
            }
            if((char)m_binArray[m_currentIndex + 1] == '-')
                break;
            m_currentIndex = m_currentIndex + 2;
        } while(true);
    }

    public int save(String destPathName)
        throws SmartUploadException, IOException, ServletException
    {
        return save(destPathName, 0);
    }

    public int save(String destPathName, int option)
        throws SmartUploadException, IOException, ServletException
    {
        int count = 0;
        if(destPathName == null)
            destPathName = m_application.getRealPath("/");
        if(destPathName.indexOf("/") != -1)
        {
            if(destPathName.charAt(destPathName.length() - 1) != '/')
                destPathName = String.valueOf(destPathName).concat("/");
        } else
        if(destPathName.charAt(destPathName.length() - 1) != '\\')
            destPathName = String.valueOf(destPathName).concat("\\");
        for(int i = 0; i < m_files.getCount(); i++)
            if(!m_files.getFile(i).isMissing())
            {
                m_files.getFile(i).saveAs(destPathName + m_files.getFile(i).getFileName(), option);
                count++;
            }

        return count;
    }

    public int getSize()
    {
        return m_totalBytes;
    }

    public byte getBinaryData(int index)
    {
        byte retval;
        try
        {
            retval = m_binArray[index];
        }
        catch(Exception e)
        {
            throw new ArrayIndexOutOfBoundsException("Index out of range (1005).");
        }
        return retval;
    }

    public Files getFiles()
    {
        return m_files;
    }

    public Request getRequest()
    {
        return m_formRequest;
    }

    public void downloadFile(String sourceFilePathName)
        throws SmartUploadException, IOException, ServletException
    {
        downloadFile(sourceFilePathName, null, null);
    }

    public void downloadFile(String sourceFilePathName, String contentType)
        throws SmartUploadException, IOException, ServletException
    {
        downloadFile(sourceFilePathName, contentType, null);
    }

    public void downloadFile(String sourceFilePathName, String contentType, String destFileName)
        throws SmartUploadException, IOException, ServletException
    {
        downloadFile(sourceFilePathName, contentType, destFileName, 65000);
    }

    public void downloadFile(String sourceFilePathName, String contentType, String destFileName, int blockSize)
        throws SmartUploadException, IOException, ServletException
    {
        if(sourceFilePathName == null)
            throw new IllegalArgumentException(String.valueOf((new StringBuffer("File '")).append(sourceFilePathName).append("' not found (1040).")));
        if(sourceFilePathName.equals(""))
            throw new IllegalArgumentException(String.valueOf((new StringBuffer("File '")).append(sourceFilePathName).append("' not found (1040).")));
        if(!isVirtual(sourceFilePathName) && m_denyPhysicalPath)
            throw new SecurityException("Physical path is denied (1035).");
        if(isVirtual(sourceFilePathName))
            sourceFilePathName = m_application.getRealPath(sourceFilePathName);
        File file = new File(sourceFilePathName);
        FileInputStream fileIn = new FileInputStream(file);
        long fileLen = file.length();
        int readBytes = 0;
        int totalRead = 0;
        byte b[] = new byte[blockSize];
        if(contentType == null)
            m_response.setContentType("application/x-msdownload");
        else
        if(contentType.length() == 0)
            m_response.setContentType("application/x-msdownload");
        else
            m_response.setContentType(contentType);
        m_response.setContentLength((int)fileLen);
        m_contentDisposition = m_contentDisposition != null ? m_contentDisposition : "attachment;";
        if(destFileName == null)
            m_response.setHeader("Content-Disposition", String.valueOf((new StringBuffer(String.valueOf(m_contentDisposition))).append(" filename=").append(getFileName(sourceFilePathName))));
        else
        if(destFileName.length() == 0)
            m_response.setHeader("Content-Disposition", m_contentDisposition);
        else
            m_response.setHeader("Content-Disposition", String.valueOf((new StringBuffer(String.valueOf(m_contentDisposition))).append(" filename=").append(destFileName)));
        while((long)totalRead < fileLen) 
        {
            readBytes = fileIn.read(b, 0, blockSize);
            totalRead += readBytes;
            m_response.getOutputStream().write(b, 0, readBytes);
        }
        fileIn.close();
    }

    public void downloadField(ResultSet rs, String columnName, String contentType, String destFileName)
        throws SQLException, IOException, ServletException
    {
        if(rs == null)
            throw new IllegalArgumentException("The RecordSet cannot be null (1045).");
        if(columnName == null)
            throw new IllegalArgumentException("The columnName cannot be null (1050).");
        if(columnName.length() == 0)
            throw new IllegalArgumentException("The columnName cannot be empty (1055).");
        byte b[] = rs.getBytes(columnName);
        if(contentType == null)
            m_response.setContentType("application/x-msdownload");
        else
        if(contentType.length() == 0)
            m_response.setContentType("application/x-msdownload");
        else
            m_response.setContentType(contentType);
        m_response.setContentLength(b.length);
        if(destFileName == null)
            m_response.setHeader("Content-Disposition", "attachment;");
        else
        if(destFileName.length() == 0)
            m_response.setHeader("Content-Disposition", "attachment;");
        else
            m_response.setHeader("Content-Disposition", "attachment; filename=".concat(String.valueOf(destFileName)));
        m_response.getOutputStream().write(b, 0, b.length);
    }

    public void fieldToFile(ResultSet rs, String columnName, String destFilePathName)
        throws SQLException, SmartUploadException, IOException, ServletException
    {
        try
        {
            if(m_application.getRealPath(destFilePathName) != null)
                destFilePathName = m_application.getRealPath(destFilePathName);
            InputStream is_data = rs.getBinaryStream(columnName);
            FileOutputStream file = new FileOutputStream(destFilePathName);
            int c;
            while((c = is_data.read()) != -1) 
                file.write(c);
            file.close();
        }
        catch(Exception e)
        {
            throw new SmartUploadException("Unable to save file from the DataBase (1020).");
        }
    }

    private String getDataFieldValue(String dataHeader, String fieldName)
    {
        String token = new String();
        String value = new String();
        int pos = 0;
        int i = 0;
        int start = 0;
        int end = 0;
        token = String.valueOf((new StringBuffer(String.valueOf(fieldName))).append("=").append('"'));
        pos = dataHeader.indexOf(token);
        if(pos > 0)
        {
            i = pos + token.length();
            start = i;
            token = "\"";
            end = dataHeader.indexOf(token, i);
            if(start > 0 && end > 0)
                value = dataHeader.substring(start, end);
        }
        return value;
    }

    private String getFileExt(String fileName)
    {
        String value = new String();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天综合天天综合色| 成人午夜视频在线| 1024精品合集| 国产亚洲精品aa午夜观看| 26uuu精品一区二区在线观看| 欧美综合色免费| 日本韩国精品在线| 在线中文字幕一区| 在线视频你懂得一区| 91麻豆国产福利在线观看| 一本色道久久综合狠狠躁的推荐| av中文字幕在线不卡| 色香蕉久久蜜桃| 欧美亚洲日本国产| 欧美美女一区二区在线观看| 欧美日韩精品专区| 日韩欧美色综合| 国产丝袜美腿一区二区三区| 国产精品免费视频观看| 亚洲女女做受ⅹxx高潮| 午夜电影网一区| 国内欧美视频一区二区| 国产一区二区毛片| 99天天综合性| 欧美乱妇15p| 国产女主播视频一区二区| 亚洲欧美日韩国产成人精品影院| 亚洲国产精品自拍| 日本91福利区| 成人av网站免费| 56国语精品自产拍在线观看| 久久精子c满五个校花| 亚洲色图视频网| 久久精品国产精品亚洲精品| 国产在线精品免费av| 99久久综合99久久综合网站| 欧美精品在线观看播放| 久久久久久久久久久久久夜| 亚洲精品免费在线观看| 麻豆精品新av中文字幕| 91色porny在线视频| 日韩一区二区精品| 国产精品免费网站在线观看| 免费看精品久久片| 91啪亚洲精品| 久久久久久久久久久99999| 亚洲在线一区二区三区| 国产成人精品网址| 制服丝袜在线91| 亚洲日本va午夜在线电影| 久久99久久精品欧美| 91麻豆国产香蕉久久精品| 久久众筹精品私拍模特| 视频在线观看一区二区三区| 99九九99九九九视频精品| 日韩欧美国产综合一区| 一区二区视频在线| 福利一区福利二区| 欧美一区二区在线看| 一区二区三区加勒比av| 国产成a人无v码亚洲福利| 日韩天堂在线观看| 亚洲电影欧美电影有声小说| av成人动漫在线观看| 久久精品视频在线免费观看| 极品少妇xxxx精品少妇| 91精品国产高清一区二区三区| 依依成人精品视频| 91色婷婷久久久久合中文| 国产精品国产a| av成人老司机| 中文字幕视频一区二区三区久| 国产一区二三区| 久久久无码精品亚洲日韩按摩| 毛片一区二区三区| 欧美成人一区二区三区在线观看 | 国产人成亚洲第一网站在线播放| 日本亚洲视频在线| 6080国产精品一区二区| 日韩电影在线免费观看| 欧美疯狂做受xxxx富婆| 青青草原综合久久大伊人精品| 欧美天堂一区二区三区| 亚洲成人第一页| 51久久夜色精品国产麻豆| 日韩av午夜在线观看| 欧美一级精品在线| 久久国产三级精品| 久久久99精品久久| 波多野结衣中文字幕一区二区三区| 中文在线资源观看网站视频免费不卡 | 国产福利一区在线观看| 久久久99精品免费观看| 色综合视频在线观看| 亚洲国产成人va在线观看天堂| 欧美日本在线观看| 精品一二三四在线| 亚洲欧洲精品一区二区三区| 91久久国产综合久久| 偷窥国产亚洲免费视频 | 国产久卡久卡久卡久卡视频精品| 国产日产精品1区| 91免费看片在线观看| 午夜国产精品一区| 久久日一线二线三线suv| 成人黄色免费短视频| 夜夜爽夜夜爽精品视频| 日韩女优视频免费观看| a在线播放不卡| 免费观看日韩av| 国产精品丝袜久久久久久app| 欧亚一区二区三区| 国产一区二区三区在线观看免费视频| 中文字幕av免费专区久久| 欧美人伦禁忌dvd放荡欲情| 国产一区二区不卡| 亚洲电影在线播放| 国产精品美女www爽爽爽| 欧美日韩夫妻久久| 成人av在线资源网站| 日本 国产 欧美色综合| 亚洲日本中文字幕区| 日韩美女天天操| 在线视频观看一区| 成人精品免费视频| 久久99国产精品久久99| 亚洲激情六月丁香| 欧美高清在线视频| 日韩精品最新网址| 欧美精品日韩一本| 色欲综合视频天天天| 国产成人自拍网| 蜜臀av一区二区三区| 亚洲激情欧美激情| 亚洲人成小说网站色在线 | 欧洲色大大久久| 成人的网站免费观看| 久久99精品久久只有精品| 亚洲第一成人在线| 一区二区三区中文字幕精品精品| 久久久综合网站| 精品欧美黑人一区二区三区| 欧美少妇一区二区| 91黄视频在线观看| av在线不卡电影| 东方欧美亚洲色图在线| 国产另类ts人妖一区二区| 免费成人深夜小野草| 午夜欧美2019年伦理| 亚洲高清视频在线| 亚洲一区二区在线免费看| 亚洲裸体xxx| 亚洲久草在线视频| 一区二区在线观看不卡| 亚洲一区日韩精品中文字幕| 日韩理论片网站| 亚洲美女在线一区| 一个色综合av| 亚洲成人在线免费| 爽爽淫人综合网网站| 日韩高清在线不卡| 久久99国内精品| 国产一区二区三区日韩 | 99久久99久久免费精品蜜臀| 成人免费高清在线观看| gogo大胆日本视频一区| 欧美性欧美巨大黑白大战| 色久综合一二码| 欧美性猛片xxxx免费看久爱| 欧美日韩精品免费观看视频| 91麻豆精品久久久久蜜臀| 日韩欧美久久一区| 国产亚洲女人久久久久毛片| 国产精品免费av| 亚洲一区二区三区中文字幕在线| 亚洲成人av中文| 久久99精品国产麻豆婷婷洗澡| 国产一区二区主播在线| 99久久99久久精品免费观看 | 久久机这里只有精品| 国产精品一区二区你懂的| 波多野结衣在线一区| 欧美日韩综合在线免费观看| 日韩欧美精品在线| 亚洲三级久久久| 久久国产剧场电影| 99久久99久久精品国产片果冻| 6080yy午夜一二三区久久| 久久久精品综合| 亚洲高清免费一级二级三级| 国产曰批免费观看久久久| 99久久国产综合精品女不卡| 欧美高清性hdvideosex| 国产精品美女久久久久久2018| 亚洲午夜精品久久久久久久久| 国产一区二区看久久| 欧美日韩国产免费| 国产精品福利电影一区二区三区四区| 亚洲国产视频a| 成人午夜电影小说|