C# 클래스 Fody.PeImage.SubStream

Represents parts of a Stream, from a start byte offset for a given length.
상속: Stream
파일 보기 프로젝트 열기: Fody/Stamp 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Close ( ) : void

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.

Flush ( ) : void

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

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

Reads a sequence of bytes from the current 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 current stream.

SetLength ( long value ) : void

Sets the length of the current stream.

SubStream ( Stream stream, long offset, long length, bool leaveParentOpen = false ) : System

Initializes a new instance of the SubStream class.

UpdateWindow ( long offset, long length ) : void

Updates the size of this SubStream relative to its parent stream.

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

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

WriteByte ( byte value ) : void

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

메소드 상세

Close() 공개 메소드

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
public Close ( ) : void
리턴 void

Flush() 공개 메소드

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public Flush ( ) : void
리턴 void

Read() 공개 메소드

Reads a sequence of bytes from the current 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 current stream.
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 current stream.
public SetLength ( long value ) : void
value long /// The desired length of the current stream in bytes. ///
리턴 void

SubStream() 공개 메소드

Initializes a new instance of the SubStream class.
public SubStream ( Stream stream, long offset, long length, bool leaveParentOpen = false ) : System
stream Stream /// The parent stream of this stream. ///
offset long /// The offset at which the stream starts. ///
length long /// The length of the . ///
leaveParentOpen bool /// A value indicating whether the parent stream should be closed when this /// is closed, or not. ///
리턴 System

UpdateWindow() 공개 메소드

Updates the size of this SubStream relative to its parent stream.
public UpdateWindow ( long offset, long length ) : void
offset long /// The new offset. ///
length long /// The new length. ///
리턴 void

Write() 공개 메소드

Writes a sequence of bytes to the current 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

WriteByte() 공개 메소드

Writes a byte to the current position in the stream and advances the position within the stream by one byte.
public WriteByte ( byte value ) : void
value byte /// The byte to write to the stream. ///
리턴 void