imported duplexbufferstream