C# Класс NetWrok.HTTP.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
Показать файл Открыть проект

Открытые методы

Метод Описание
CrcCalculatorStream ( System stream ) : System

The constructor.

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

The constructor.

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() публичный Метод

The constructor.
public CrcCalculatorStream ( System stream ) : System
stream System The underlying stream
Результат System

CrcCalculatorStream() публичный Метод

The constructor.
public CrcCalculatorStream ( System stream, System.Int64 length ) : System
stream System The underlying stream
length System.Int64 The length of the stream to slurp
Результат 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