C# Class Pchp.Library.Streams.NativeStream

An implementation of PhpStream as a simple encapsulation of a .NET System.IO.Stream class which is directly accessible via the RawStream property.
Inheritance: PhpStream
Mostrar archivo Open project: iolevel/peachpie

Protected Properties

Property Type Description
stream Stream

Public Methods

Method Description
NativeStream ( Context ctx, Stream nativeStream, StreamWrapper openingWrapper, StreamAccessOptions accessOptions, string openedPath, StreamContext context ) : Pchp.Core

Protected Methods

Method Description
FreeManaged ( ) : void

PhpResource.FreeManaged overridden to get rid of the contained context on Dispose.

RawFlush ( ) : bool
RawLength ( ) : int

Returns the Length property of the underlying stream.

RawRead ( byte buffer, int offset, int count ) : int
RawSeek ( int offset, SeekOrigin whence ) : bool
RawTell ( ) : int
RawWrite ( byte buffer, int offset, int count ) : int
SeekExpects ( long position, long length, long offset, SeekOrigin whence ) : long

Get the expected position in the stream to check for Seek() failure.

Method Details

FreeManaged() protected method

PhpResource.FreeManaged overridden to get rid of the contained context on Dispose.
protected FreeManaged ( ) : void
return void

NativeStream() public method

public NativeStream ( Context ctx, Stream nativeStream, StreamWrapper openingWrapper, StreamAccessOptions accessOptions, string openedPath, StreamContext context ) : Pchp.Core
ctx Pchp.Core.Context
nativeStream Stream
openingWrapper StreamWrapper
accessOptions StreamAccessOptions
openedPath string
context StreamContext
return Pchp.Core

RawFlush() protected method

protected RawFlush ( ) : bool
return bool

RawLength() protected method

Returns the Length property of the underlying stream.
protected RawLength ( ) : int
return int

RawRead() protected method

protected RawRead ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

RawSeek() protected method

protected RawSeek ( int offset, SeekOrigin whence ) : bool
offset int
whence SeekOrigin
return bool

RawTell() protected method

protected RawTell ( ) : int
return int

RawWrite() protected method

protected RawWrite ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

SeekExpects() protected method

Get the expected position in the stream to check for Seek() failure.
protected SeekExpects ( long position, long length, long offset, SeekOrigin whence ) : long
position long Actual position in the stream.
length long The length of the stream.
offset long The offset for the seek() operation.
whence SeekOrigin Where to count the new position from.
return long

Property Details

stream protected_oe property

The encapsulated native stream.
protected Stream stream
return Stream