C# 클래스 Microsoft.Deployment.Compression.Zip.CrcStream

상속: Stream
파일 보기 프로젝트 열기: chakrit/rambase 1 사용 예제들

Private Properties

프로퍼티 타입 설명
MakeCrcTable uint[]
Reflect uint
UpdateCrc void

공개 메소드들

메소드 설명
Close ( ) : void

Closes the underlying stream.

CrcStream ( Stream source ) : System

Creates a new CrcStream instance from a source stream.

Flush ( ) : void

Flushes the source stream.

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

Reads a sequence of bytes from the source stream and advances the position within the stream by the number of bytes read.

Seek ( long offset, SeekOrigin origin ) : long

Sets the position within the source stream.

Note the CRC is only calculated over bytes that are actually read or written, so any bytes skipped by seeking will not contribute to the CRC.

SetLength ( long value ) : void

Sets the length of the source stream.

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

Writes a sequence of bytes to the source stream and advances the current position within this stream by the number of bytes written.

비공개 메소드들

메소드 설명
MakeCrcTable ( ) : uint[]

Computes a table that speeds up calculation of the CRC.

Reflect ( uint value, int bits ) : uint

Reflects the ordering of certain number of bits. For exmample when reflecting one byte, bit one is swapped with bit eight, bit two with bit seven, etc.

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

Updates the CRC with a range of bytes that were read or written.

메소드 상세

Close() 공개 메소드

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

CrcStream() 공개 메소드

Creates a new CrcStream instance from a source stream.
public CrcStream ( Stream source ) : System
source Stream Underlying stream where bytes will be read from or written to.
리턴 System

Flush() 공개 메소드

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

Read() 공개 메소드

Reads a sequence of bytes from the source stream and advances the position within the stream by the number of bytes read.
public Read ( byte buffer, int offset, int count ) : int
buffer byte An array of bytes. When this method returns, the buffer /// contains the specified byte array with the values between offset and /// (offset + count - 1) replaced by the bytes read from the current source.
offset int The zero-based byte offset in buffer at which to begin /// storing the data read from the current stream.
count int The maximum number of bytes to be read from the current stream.
리턴 int

Seek() 공개 메소드

Sets the position within the source stream.
Note the CRC is only calculated over bytes that are actually read or written, so any bytes skipped by seeking will not contribute to the CRC.
public Seek ( long offset, SeekOrigin origin ) : long
offset long A byte offset relative to the origin parameter.
origin SeekOrigin A value of type SeekOrigin indicating /// the reference point used to obtain the new position.
리턴 long

SetLength() 공개 메소드

Sets the length of the source stream.
public SetLength ( long value ) : void
value long The desired length of the /// stream in bytes.
리턴 void

Write() 공개 메소드

Writes a sequence of bytes to the source stream and advances the current position within this stream by the number of bytes written.
public Write ( byte buffer, int offset, int count ) : void
buffer byte An array of bytes. This method copies count /// bytes from buffer to the current stream.
offset int The zero-based byte offset in buffer at which /// to begin copying bytes to the current stream.
count int The number of bytes to be written to the /// current stream.
리턴 void