C# 클래스 CmisSync.Lib.FileTransmission.ChunkedDownloader

Chunked downloader.
상속: IFileDownloader
파일 보기 프로젝트 열기: OpenDataSpace/CmisSync 1 사용 예제들

공개 메소드들

메소드 설명
ChunkedDownloader ( long chunkSize = 1024*1024, IFileTransmissionStorage storage = null ) : System

Initializes a new instance of the CmisSync.Lib.FileTransmission.ChunkedDownloader class.

Dispose ( ) : void

Releases all resource used by the CmisSync.Lib.FileTransmission.ChunkedDownloader object.

Call Dispose when you are finished using the CmisSync.Lib.FileTransmission.ChunkedDownloader. The Dispose method leaves the CmisSync.Lib.FileTransmission.ChunkedDownloader in an unusable state. After calling Dispose, you must release all references to the CmisSync.Lib.FileTransmission.ChunkedDownloader so the garbage collector can reclaim the memory that the CmisSync.Lib.FileTransmission.ChunkedDownloader was occupying.

DownloadFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg, UpdateChecksum update = null ) : void

Downloads the file and returns the SHA-1 hash of the content of the saved file

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

비공개 메소드들

메소드 설명
DownloadNextChunk ( IDocument remoteDocument, long offset, long remainingBytes, Transmission transmission, Stream outputstream, HashAlgorithm hashAlg ) : int

메소드 상세

ChunkedDownloader() 공개 메소드

Initializes a new instance of the CmisSync.Lib.FileTransmission.ChunkedDownloader class.
public ChunkedDownloader ( long chunkSize = 1024*1024, IFileTransmissionStorage storage = null ) : System
chunkSize long Chunk size.
storage IFileTransmissionStorage IFileTransmissionStorage to persist
리턴 System

Dispose() 공개 메소드

Releases all resource used by the CmisSync.Lib.FileTransmission.ChunkedDownloader object.
Call Dispose when you are finished using the CmisSync.Lib.FileTransmission.ChunkedDownloader. The Dispose method leaves the CmisSync.Lib.FileTransmission.ChunkedDownloader in an unusable state. After calling Dispose, you must release all references to the CmisSync.Lib.FileTransmission.ChunkedDownloader so the garbage collector can reclaim the memory that the CmisSync.Lib.FileTransmission.ChunkedDownloader was occupying.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.
protected Dispose ( bool disposing ) : void
disposing bool If set to true disposing.
리턴 void

DownloadFile() 공개 메소드

Downloads the file and returns the SHA-1 hash of the content of the saved file
On any disc or network io exception If the remote object has been disposed before the dowload is finished If download is aborted On exceptions thrown by the CMIS Server/Client
public DownloadFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg, UpdateChecksum update = null ) : void
remoteDocument IDocument Remote document.
localFileStream Stream Local taget file stream.
transmission Transmission Transmission status.
hashAlg System.Security.Cryptography.HashAlgorithm Hash algoritm, which should be used to calculate hash of the uploaded stream content
update UpdateChecksum Not or not yet used
리턴 void