Adaptation to stream/buffer abstraction