createLimitedInputStream

Constructs a limited stream from an existing input stream.

createLimitedInputStream
(
InputStream
)
(
InputStream stream
,,
bool silent_limit = false
)
if (
isInputStream!InputStream
)

Parameters

stream InputStream

the input stream to be wrapped

byte_limit ulong

the maximum number of bytes readable from the constructed stream

silent_limit bool

if set, the stream will behave exactly like the original stream, but will throw an exception as soon as the limit is reached.

Meta