完整的错误信息:
Exception in thread "main" java.nio.BufferUnderflowException
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:151)
at com.weixiao.network.GatewayInstanceTest.main(GatewayInstanceTest.java:169)
这是在 main 函数中测试的,所以错误堆栈信息很少。
这是在操作 java.nio.ByteBuffer 时