Refactor PacketDataStream into ByteBuffer-based PacketBuffer.