C# 클래스 SharpGIS.ZLib.CrcCalculatorStream

A Stream that calculates a CRC32 (a checksum) on all bytes read, or on all bytes written.

This class can be used to verify the CRC of a ZipEntry when reading from a stream, or to calculate a CRC when writing to a stream. The stream should be used to either read, or write, but not both. If you intermix reads and writes, the results are not defined.

This class is intended primarily for use internally by the DotNetZip library.

상속: System.IO.Stream, System.IDisposable
파일 보기 프로젝트 열기: sozialhelden/wheelmap-wp7

공개 메소드들

메소드 설명
Close ( ) : void

Closes the stream.

CrcCalculatorStream ( System stream ) : System

The default constructor.

Instances returned from this constructor will leave the underlying stream open upon Close().

CrcCalculatorStream ( System stream, System.Int64 length ) : System

A constructor allowing the specification of the length of the stream to read.

Instances returned from this constructor will leave the underlying stream open upon Close().

CrcCalculatorStream ( System stream, System.Int64 length, bool leaveOpen ) : System

A constructor allowing the specification of the length of the stream to read, as well as whether to keep the underlying stream open upon Close().

CrcCalculatorStream ( System stream, bool leaveOpen ) : System

The constructor allows the caller to specify how to handle the underlying stream at close.

Flush ( ) : void

Flush the stream.

Read ( byte buffer, int offset, int count ) : int

Read from the stream

Seek ( long offset, System origin ) : long

Not implemented.

SetLength ( long value ) : void

Not implemented.

Write ( byte buffer, int offset, int count ) : void

Write to the stream.

비공개 메소드들

메소드 설명
CrcCalculatorStream ( bool leaveOpen, System.Int64 length, System stream ) : System
IDisposable ( ) : void

메소드 상세

Close() 공개 메소드

Closes the stream.
public Close ( ) : void
리턴 void

CrcCalculatorStream() 공개 메소드

The default constructor.
Instances returned from this constructor will leave the underlying stream open upon Close().
public CrcCalculatorStream ( System stream ) : System
stream System The underlying stream
리턴 System

CrcCalculatorStream() 공개 메소드

A constructor allowing the specification of the length of the stream to read.
Instances returned from this constructor will leave the underlying stream open upon Close().
public CrcCalculatorStream ( System stream, System.Int64 length ) : System
stream System The underlying stream
length System.Int64 The length of the stream to slurp
리턴 System

CrcCalculatorStream() 공개 메소드

A constructor allowing the specification of the length of the stream to read, as well as whether to keep the underlying stream open upon Close().
public CrcCalculatorStream ( System stream, System.Int64 length, bool leaveOpen ) : System
stream System The underlying stream
length System.Int64 The length of the stream to slurp
leaveOpen bool true to leave the underlying stream /// open upon close of the CrcCalculatorStream.; false otherwise.
리턴 System

CrcCalculatorStream() 공개 메소드

The constructor allows the caller to specify how to handle the underlying stream at close.
public CrcCalculatorStream ( System stream, bool leaveOpen ) : System
stream System The underlying stream
leaveOpen bool true to leave the underlying stream /// open upon close of the CrcCalculatorStream.; false otherwise.
리턴 System

Flush() 공개 메소드

Flush the stream.
public Flush ( ) : void
리턴 void

Read() 공개 메소드

Read from the stream
public Read ( byte buffer, int offset, int count ) : int
buffer byte the buffer to read
offset int the offset at which to start
count int the number of bytes to read
리턴 int

Seek() 공개 메소드

Not implemented.
public Seek ( long offset, System origin ) : long
offset long N/A
origin System N/A
리턴 long

SetLength() 공개 메소드

Not implemented.
public SetLength ( long value ) : void
value long N/A
리턴 void

Write() 공개 메소드

Write to the stream.
public Write ( byte buffer, int offset, int count ) : void
buffer byte the buffer from which to write
offset int the offset at which to start writing
count int the number of bytes to write
리턴 void