Class ReadOnlyWrapperStream
Wrapper stream that only supports reading
public class ReadOnlyWrapperStream : WrapperStream, IDisposable, IAsyncDisposable
- Inheritance
-
ReadOnlyWrapperStream
- Implements
- Derived
- Inherited Members
Constructors
ReadOnlyWrapperStream(Stream)
public ReadOnlyWrapperStream(Stream baseStream)
Parameters
baseStream
Stream
Properties
CanRead
Gets a value indicating whether the current stream supports reading. True if the stream supports reading; otherwise, false.
public override bool CanRead { get; }
Property Value
CanSeek
Gets a value indicating whether the current stream supports seeking. True if the stream supports seeking; otherwise, false.
public override bool CanSeek { get; }
Property Value
CanWrite
Gets a value indicating whether the current stream supports writing. True if the stream supports writing; otherwise, false.
public override bool CanWrite { get; }
Property Value
Length
Gets the length in bytes of the stream.
public override long Length { get; }
Property Value
Position
Gets or sets the position within the current stream.
public override long Position { get; set; }
Property Value
Methods
BeginWrite(byte[], int, int, AsyncCallback, object)
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
Parameters
buffer
byte[]offset
intcount
intcallback
AsyncCallbackstate
object
Returns
EndWrite(IAsyncResult)
public override void EndWrite(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResult
Flush()
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public override void Flush()
Seek(long, SeekOrigin)
public override long Seek(long offset, SeekOrigin origin)
Parameters
offset
longorigin
SeekOrigin
Returns
SetLength(long)
public override void SetLength(long value)
Parameters
value
long
Write(byte[], int, int)
public override void Write(byte[] buffer, int offset, int count)