This commit is contained in:
tursom 2021-01-20 15:17:35 +08:00
parent 42c1582035
commit 1d6df8c851

View File

@ -99,7 +99,8 @@ interface ByteBuffer : Closeable {
fun toString(size: Int): String {
val bytes = getBytes(size)
readPosition += bytes.size
// 将测试的字节返还回来
readPosition -= bytes.size
return String(bytes)
}