Click or drag to resize

WrappingStream Class

A Stream that wraps another stream. The major feature of WrappingStream is that it does not dispose the underlying stream when it is disposed; this is useful when using classes such as BinaryReader and CryptoStream that take ownership of the stream passed to their constructors.
Inheritance Hierarchy
System.Object
  System.MarshalByRefObject
    System.IO.Stream
      Ptv.XServer.Controls.Map.Tools.WrappingStream

Namespace:  Ptv.XServer.Controls.Map.Tools
Assembly:  Ptv.XServer.Controls.Map (in Ptv.XServer.Controls.Map.dll) Version: 1.7.10.0
Syntax
public class WrappingStream : Stream

The WrappingStream type exposes the following members.

Constructors
  NameDescription
Public methodWrappingStream
Initializes a new instance of the WrappingStream class.
Top
Properties
  NameDescription
Public propertyCanRead
Gets a value indicating whether the current stream supports reading.
(Overrides Stream.CanRead.)
Public propertyCanSeek
Gets a value indicating whether the current stream supports seeking.
(Overrides Stream.CanSeek.)
Public propertyCanWrite
Gets a value indicating whether the current stream supports writing.
(Overrides Stream.CanWrite.)
Public propertyLength
Gets the length in bytes of the stream.
(Overrides Stream.Length.)
Public propertyPosition
Gets or sets the position within the current stream.
(Overrides Stream.Position.)
Protected propertyWrappedStream
Gets the wrapped stream.
Top
Methods
  NameDescription
Public methodBeginRead
Begins an asynchronous read operation.
(Overrides Stream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object).)
Public methodBeginWrite
Begins an asynchronous write operation.
(Overrides Stream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object).)
Protected methodDispose
Releases the unmanaged resources used by the WrappingStream and optionally releases the managed resources.
(Overrides Stream.Dispose(Boolean).)
Public methodEndRead
Waits for the pending asynchronous read to complete.
(Overrides Stream.EndRead(IAsyncResult).)
Public methodEndWrite
Ends an asynchronous write operation.
(Overrides Stream.EndWrite(IAsyncResult).)
Public methodFlush
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
(Overrides Stream.Flush().)
Public methodRead
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
(Overrides Stream.Read(Byte[], Int32, Int32).)
Public methodReadByte
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
(Overrides Stream.ReadByte().)
Public methodSeek
Sets the position within the current stream.
(Overrides Stream.Seek(Int64, SeekOrigin).)
Public methodSetLength
Sets the length of the current stream.
(Overrides Stream.SetLength(Int64).)
Public methodWrite
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
(Overrides Stream.Write(Byte[], Int32, Int32).)
Public methodWriteByte
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
(Overrides Stream.WriteByte(Byte).)
Top
Extension Methods
  NameDescription
Public Extension MethodCopyTo
Byte wise copy of a stream.
(Defined by StreamExtensions.)
Public Extension MethodGetBytes
Reads and returns the bytes from the given stream.
(Defined by StreamExtensions.)
Public Extension MethodReset
Sets the position of a stream to the beginning and returns the stream.
(Defined by WmtsMapServiceExtensions.)
Public Extension MethodResizeImage
Resizes an image to a specific size.
(Defined by ImageExtensions.)
Public Extension MethodToJson
Converts an object to a JSON string representation.
(Defined by JSONWriter.)
Public Extension MethodWrite
Write all the bytes given in the byte array.
(Defined by ArgbImageExtensions.)
Top
See Also