zoukankan      html  css  js  c++  java
  • [导入]SunriseUpload.0.9.1的源码分析(六)

    http://blog.aspcool.com/wucountry/archive/2005/11/04/3259.html

    SunriseUpload.0.9.1的源码分析(六)

    License

    using System;
    using System.Collections;
    using System.IO;
    using System.Text;
    using System.Web;

    namespace Sunrise.Web.Upload
    {
        
    internal class RequestStream
        
    {
            
    Fields

            
    // Nested Types
            public enum FileStatus : byte
            
    {
                
    // Fields
                Close = 1,
                Open 
    = 0
            }


            
    public enum ReadStatus : byte
            
    {
                
    // Fields
                NoRead = 0,
                Read 
    = 1
            }


            
    Properties

            
    /// <summary>
            
    /// 
            
    /// </summary>
            
    /// <param name="preloadBytes">Already upload data.</param>
            
    /// <param name="boundaryBytes"></param>
            
    /// <param name="fileStream">Stream to output data</param>
            
    /// <param name="fileStatus"></param>
            
    /// <param name="readStatus"></param>
            
    /// <param name="uploadFolder"></param>
            
    /// <param name="writeToDisk"></param>
            
    /// <param name="context">HttpContext,contaion the data uploaded by user.</param>
            
    /// <param name="currFileName">current file name?</param>

            public RequestStream(    byte[] preloadBytes,
                                    
    byte[] boundaryBytes,
                                    FileStream fileStream,
                                    FileStatus fileStatus,
                                    ReadStatus readStatus,
                                    
    string uploadFolder,
                                    
    bool writeToDisk,
                                    HttpContext context,
                                    
    string currFileName)
            
    {
                
    this.readBody            = new ArrayList();
                
    this.contentBody        = new ArrayList();
                
    this.fs                    = null;
                
    this.originalFileName    = string.Empty;
                
    this.fileStatus            = FileStatus.Close;
                
    this.readStatus             = ReadStatus.NoRead;
                
    this.originalFileName    = currFileName;
                
    this.fs                    = fileStream;
                
    this.fileStatus            = fileStatus;
                
    this.readStatus            = readStatus;

                
    int preloadPosition        = 0;
                
    while ((preloadPosition < preloadBytes.Length))
                
    {                
                    ArrayList list1 
    = new ArrayList();
                    

                    preloadPosition
    ++;
                }

            }


            
    /// <summary>
            
    /// Destructor method, release all resource
            
    /// </summary>

            ~ RequestStream()
            
    {
                
    this.readBody = null;
                
    this.contentBody = null;
                
    this.fs = null;
            }

        }

    }

     


    文章来源:http://computer.mblogger.cn/wucountry/posts/48602.aspx
    ================================
      /\_/\                        
     (=^o^=)  Wu.Country@侠缘      
     (~)@(~)  一辈子,用心做一件事!
    --------------------------------
      学而不思则罔,思而不学则怠!  
    ================================
  • 相关阅读:
    第15.14节 PyQt(Python+Qt)入门学习:Designer的Buttons按钮详解
    PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox的orientation和centerButtons属性
    PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox的按钮改变缺省文字的方法
    PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox增加自定义按钮的方法
    PyQt(Python+Qt)学习随笔:Designer中QDialogButtonBox确认clicked信号是哪个按钮发送的方法
    织梦更新列表页提示Fatal error: Call to a member function GetInnerText() on a non-object 解决方法
    怎么调取dede三级栏目名及栏目下的内容列表
    DEDE [field:global name=autoindex/] 按序列号递增
    在cms以及kindeditor中插入百度动态地图的方法
    DEDE文章列表加上序号效果
  • 原文地址:https://www.cnblogs.com/WuCountry/p/305654.html
Copyright © 2011-2022 走看看