vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Module vibe.stream.counting

Wrapper streams which count the number of bytes or limit the stream based on the number of transferred bytes.

Functions

NameDescription
createCountingOutputStream(output, byte_limit) Creates a proxy stream that counts the number of bytes written.
createEndCallbackInputStream(input, callback) Creates a stream that fires a callback once the end of the underlying input stream is reached.
createLimitedInputStream(stream, byte_limit, silent_limit) Constructs a limited stream from an existing input stream.

Classes

NameDescription
CountingInputStream Wraps an existing input stream, counting the bytes that are written.
CountingOutputStream Wraps an existing output stream, counting the bytes that are written.
EndCallbackInputStream Wraps an input stream and calls the given delegate once the stream is empty.
LimitedInputStream Wraps an existing stream, limiting the amount of data that can be read.
LimitException
Authors

Sönke Ludwig

Copyright

© 2012 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.