public OptimizedFTPFileReadHandler(ClientShareDetail csd, uint rawCreationDisposition, FileFTPInfo foundFileInfo, OptimizedFTPFileReadHandler cachedReadBuffer)
     : base(csd, rawCreationDisposition, foundFileInfo)
 {
     if ((cachedReadBuffer != null) &&
         (cachedReadBuffer.ftpReadBuffer != null)
         )
     {
         ftpReadBuffer = new FTPTempFile(true);
         cachedReadBuffer.ftpReadBuffer.Position = 0;
         cachedReadBuffer.ftpReadBuffer.IO.CopyTo(ftpReadBuffer.IO);
     }
 }
        void CheckAndReadIntoTemp()
        {
            long readLength = Length;

            if (Length > csd.CacheFileMaxSize)
            {
                readLength = csd.CacheFileMaxSize;
            }
            if ((readLength > 0) &&
                (ftpReadBuffer == null)
                )
            {
                // Set to true to allow windows caching to take place
                ftpReadBuffer = new FTPTempFile(true);
            }
            // Now check to see if we have read enough
            if (readLength > ftpReadBuffer.IO.Length)
            {
                FillInternalTempFile(readLength);
            }
        }