Click or drag to resize

StreamExtensions Class

Defines extension functions related to Stream manipulation.
Inheritance Hierarchy
SystemObject
  GSF.IOStreamExtensions

Namespace: GSF.IO
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public static class StreamExtensions
View Source

The StreamExtensions type exposes the following members.

Methods
 NameDescription
Public Extension MethodCopyStreamObsolete.
Copies input Stream onto output Stream.
Public Extension MethodCopyTo Writes the contents of a stream to the provided stream.
Public Extension MethodRead7BitUInt32 Reads the 7-bit encoded value from the stream.
Public Extension MethodReadAll Reads all of the provided bytes. Will not return prematurely, but continue to execute a Read(Byte, Int32, Int32) command until the entire length has been read.
Public Extension MethodReadBoolean Reads the value from the stream in little endian format.
Public Extension MethodReadBytes(Stream) Reads a byte array from a Stream. The number of bytes should be prefixed in the stream.
Public Extension MethodReadBytes(Stream, Int32) Reads a byte array from a Stream. The number of bytes should be prefixed in the stream.
Public Extension MethodReadChar Reads the value from the stream in little endian format.
Public Extension MethodReadDateTime Reads the value from the stream in little endian format.
Public Extension MethodReadDecimal Reads a decimal from the stream in Little Endian bytes.
Public Extension MethodReadDouble Reads the value from the stream in little endian format.
Public Extension MethodReadGuid Reads a Guid from the stream in Little Endian bytes.
Public Extension MethodReadInt16 Reads the value from the stream in little endian format.
Public Extension MethodReadInt32 Reads the value from the stream in little endian format.
Public Extension MethodReadInt32Collection Writes the supplied string to a Stream in UTF8 encoding.
Public Extension MethodReadInt64 Reads the value from the stream in little endian format.
Public Extension MethodReadNextByte Read a byte from the stream. Will throw an exception if the end of the stream has been reached.
Public Extension MethodReadNullableString Reads a string from a Stream that was encoded in UTF8. Value can be null and is prefixed with a boolean.
Public Extension MethodReadObject Reads an object from a stream.
Public Extension MethodReadSByte Reads the value from the stream in little endian format.
Public Extension MethodReadSingle Reads the value from the stream in little endian format.
Public Extension MethodReadStream Reads entire Stream contents, and returns Byte array of data.
Public Extension MethodReadString Reads a string from a Stream that was encoded in UTF8.
Public Extension MethodReadStringCollection Writes the supplied string to a Stream in UTF8 encoding.
Public Extension MethodReadUInt16 Reads the value from the stream in little endian format.
Public Extension MethodReadUInt32 Reads the value from the stream in little endian format.
Public Extension MethodReadUInt64 Reads the value from the stream in little endian format.
Public Extension MethodWrite(Stream, Boolean) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, Byte) Writes the supplied value to in little endian format.
Public Extension MethodWrite(Stream, Byte) Writes the entire buffer to the stream
Public Extension MethodWrite(Stream, Char) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, DateTime) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, Decimal) Writes the supplied string to a Stream in UTF8 encoding.
Public Extension MethodWrite(Stream, Double) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, Guid) Writes a guid in little endian bytes to the stream
Public Extension MethodWrite(Stream, Int16) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, Int32) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, Int64) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, SByte) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, Single) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, String) Writes the supplied string to a Stream in UTF8 encoding.
Public Extension MethodWrite(Stream, UInt16) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, UInt32) Writes the supplied value to stream in little endian format.
Public Extension MethodWrite(Stream, UInt64) Writes the supplied value to stream in little endian format.
Public Extension MethodWriteCollection(Stream, ICollectionInt32) Writes the supplied Collection to a Stream.
Public Extension MethodWriteCollection(Stream, ICollectionString) Writes the supplied Collection to a Stream.
Public Extension MethodWriteNullable Writes the supplied string to a Stream in UTF8 encoding with a prefix if the value is null
Public Extension MethodWriteObject Encodes an object on a stream.
Public Extension MethodWriteWithLength Writes the supplied value to stream along with prefixing the length so it can be properly read as a unit.
Top
See Also