|
ElectroServer 5 Client: C#
|
A Stream that calculates a CRC32 (a checksum) on all bytes read, or on all bytes written. More...
Public Member Functions | |
| CrcCalculatorStream (System.IO.Stream stream) | |
| The default constructor. More... | |
| CrcCalculatorStream (System.IO.Stream stream, bool leaveOpen) | |
| The constructor allows the caller to specify how to handle the underlying stream at close. More... | |
| CrcCalculatorStream (System.IO.Stream stream, Int64 length) | |
| A constructor allowing the specification of the length of the stream to read. More... | |
| CrcCalculatorStream (System.IO.Stream stream, Int64 length, bool leaveOpen) | |
| 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(). More... | |
| override int | Read (byte[] buffer, int offset, int count) |
| Read from the stream More... | |
| override void | Write (byte[] buffer, int offset, int count) |
| Write to the stream. More... | |
| override void | Flush () |
| Flush the stream. More... | |
| override long | Seek (long offset, System.IO.SeekOrigin origin) |
| Not implemented. More... | |
| override void | SetLength (long value) |
| Not implemented. More... | |
| override void | Close () |
| Closes the stream. More... | |
Properties | |
| Int64 | TotalBytesSlurped [get] |
| Gets the total number of bytes run through the CRC32 calculator. More... | |
| Int32 | Crc [get] |
| Provides the current CRC for all blocks slurped in. More... | |
| bool | LeaveOpen [get, set] |
| Indicates whether the underlying stream will be left open when the CrcCalculatorStream is Closed. More... | |
| override bool | CanRead [get] |
| Indicates whether the stream supports reading. More... | |
| override bool | CanSeek [get] |
| Indicates whether the stream supports seeking. More... | |
| override bool | CanWrite [get] |
| Indicates whether the stream supports writing. More... | |
| override long | Length [get] |
| Not implemented. More... | |
| override long | Position [get, set] |
| Not implemented. More... | |
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.
| Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.CrcCalculatorStream | ( | System.IO.Stream | stream | ) |
The default constructor.
Instances returned from this constructor will leave the underlying stream open upon Close().
| stream | The underlying stream |
| Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.CrcCalculatorStream | ( | System.IO.Stream | stream, |
| bool | leaveOpen | ||
| ) |
The constructor allows the caller to specify how to handle the underlying stream at close.
| stream | The underlying stream |
| leaveOpen | true to leave the underlying stream open upon close of the CrcCalculatorStream.; false otherwise. |
| Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.CrcCalculatorStream | ( | System.IO.Stream | stream, |
| Int64 | length | ||
| ) |
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().
| stream | The underlying stream |
| length | The length of the stream to slurp |
| Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.CrcCalculatorStream | ( | System.IO.Stream | stream, |
| Int64 | length, | ||
| bool | leaveOpen | ||
| ) |
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().
| stream | The underlying stream |
| length | The length of the stream to slurp |
| leaveOpen | true to leave the underlying stream open upon close of the CrcCalculatorStream.; false otherwise. |
| override void Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.Close | ( | ) |
Closes the stream.
| override void Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.Flush | ( | ) |
Flush the stream.
| override int Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.Read | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Read from the stream
| buffer | the buffer to read |
| offset | the offset at which to start |
| count | the number of bytes to read |
| override long Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.Seek | ( | long | offset, |
| System.IO.SeekOrigin | origin | ||
| ) |
Not implemented.
| offset | N/A |
| origin | N/A |
| override void Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.SetLength | ( | long | value | ) |
Not implemented.
| value | N/A |
| override void Electrotank.Electroserver5.Ionic.Zlib.CrcCalculatorStream.Write | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Write to the stream.
| buffer | the buffer from which to write |
| offset | the offset at which to start writing |
| count | the number of bytes to write |
|
get |
Indicates whether the stream supports reading.
|
get |
Indicates whether the stream supports seeking.
|
get |
Indicates whether the stream supports writing.
|
get |
Provides the current CRC for all blocks slurped in.
|
getset |
Indicates whether the underlying stream will be left open when the CrcCalculatorStream is Closed.
|
get |
Not implemented.
|
getset |
Not implemented.
|
get |
Gets the total number of bytes run through the CRC32 calculator.
This is either the total number of bytes read, or the total number of bytes written, depending on the direction of this stream.