mirror of
https://github.com/tursom/TursomServer.git
synced 2024-12-29 14:30:55 +08:00
update buffers
This commit is contained in:
parent
6f8b21312f
commit
bf98749f44
@ -53,8 +53,12 @@ open class ListByteBuffer(
|
||||
override fun writeBuffer(): java.nio.ByteBuffer = throw UnsupportedOperationException()
|
||||
|
||||
override fun append(buffer: ByteBuffer) {
|
||||
val bufReadPosition = buffer.readPosition
|
||||
val bufWritePosition = buffer.writePosition
|
||||
buffers.add(buffer)
|
||||
buffersArrayCache = null
|
||||
readPosition += bufReadPosition
|
||||
writePosition += bufWritePosition
|
||||
}
|
||||
|
||||
override fun slice(position: Int, size: Int, readPosition: Int, writePosition: Int): ByteBuffer =
|
||||
|
Loading…
Reference in New Issue
Block a user