C# Class Agnos.Utils.BoundInputStream

implements a bounded (fixed length) input stream. when closed, the stream will skip all the unread data
Inheritance: Stream
Mostra file Open project: tomerfiliba/agnos Class Usage Examples

Public Methods

Method Description
BoundInputStream ( Stream stream, int length, bool skip_underlying, bool close_underlying ) : System

Close ( ) : void

closes the stream

Flush ( ) : void

Not supported

Read ( byte data, int offset, int count ) : int

see Stream.Read for reference. will not read passed the predetermined length

Seek ( long offset, SeekOrigin origin ) : long

Not supported

SetLength ( long value ) : void

Not supported

Skip ( int count ) : int

skips `count` bytes

Write ( byte buffer, int offset, int count ) : void

Not supported

Method Details

BoundInputStream() public method

public BoundInputStream ( Stream stream, int length, bool skip_underlying, bool close_underlying ) : System
stream Stream the underlying stream
length int the length of the substream
skip_underlying bool whether to skip all unread data /// when closed
close_underlying bool whether to close the underlying /// stream when this stream is closed
return System

Close() public method

closes the stream
public Close ( ) : void
return void

Flush() public method

Not supported
public Flush ( ) : void
return void

Read() public method

see Stream.Read for reference. will not read passed the predetermined length
public Read ( byte data, int offset, int count ) : int
data byte
offset int
count int
return int

Seek() public method

Not supported
public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

Not supported
public SetLength ( long value ) : void
value long
return void

Skip() public method

skips `count` bytes
public Skip ( int count ) : int
count int the number of bytes to skip. if negative, skip /// all the way to the end of stream
return int

Write() public method

Not supported
public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void