java - ByteBuffer vs. Buffer on Datagram Packets -
i've read bytebuffer (java.nio) should used on buffer class reading in data because it's more efficient (?). question revolves around udp client reads packets multicast address , processes them primitive objects. efficient/fastest way parse these packets datagramsocket? right now, have datagram packet byte array wrap bytebuffer around , read there. goal minimize new object creation , maximize speed.
a datagramsocket
cannot read directly bytebuffer
, can using datagramchannel
instead.
Comments
Post a Comment