在向 ByteBuffer 中 put 数据时,出现异常。
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
at java.nio.ByteBuffer.put(ByteBuffer.java:859)
这是因为 缓存 满了。
可以通过以下条件判断:
this.writeBuffer.position() == this.writeBuffer.capacity()
在向 ByteBuffer 中 put 数据时,出现异常。
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
at java.nio.ByteBuffer.put(ByteBuffer.java:859)
这是因为 缓存 满了。
可以通过以下条件判断:
this.writeBuffer.position() == this.writeBuffer.capacity()