C# Class Fody.PeImage.SubStream

Represents parts of a Stream, from a start byte offset for a given length.
Inheritance: Stream
Afficher le fichier Open project: Fody/Stamp Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
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.

Method Details

Close() public méthode

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
Résultat void

Flush() public méthode

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

Read() public méthode

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. ///
Résultat int

Seek() public méthode

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. ///
Résultat long

SetLength() public méthode

Sets the length of the current stream.
public SetLength ( long value ) : void
value long /// The desired length of the current stream in bytes. ///
Résultat void

SubStream() public méthode

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. ///
Résultat System

UpdateWindow() public méthode

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. ///
Résultat void

Write() public méthode

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. ///
Résultat void

WriteByte() public méthode

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. ///
Résultat void