I think it will make JVM crash because `nioData` can refer the same buffer with `packet.data()`.  I would free it at the finally block.