use buffered io for input and output streams reuse single bytebuffer instead of creating it for every packet