switched input/output from my custom buffer interface to standard ByteChannel one