From e281e20e53cb4fb8f051f38a0a16a4e2c56b60ef Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Thu, 7 Aug 2025 14:57:13 +0200 Subject: change visibility to writeInteger and writeString in OutMessage --- src/main/kotlin/OutMessage.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/OutMessage.kt b/src/main/kotlin/OutMessage.kt index bc05784..9a3bcfb 100644 --- a/src/main/kotlin/OutMessage.kt +++ b/src/main/kotlin/OutMessage.kt @@ -90,7 +90,7 @@ class OutMessage(val type: NinePMessageType, val tag: UShort, val fieldNames: Li * @param tl The networking API. * @param value The number's value. */ - private fun writeInteger(tl: TransportLayer, value: BigInteger) { + fun writeInteger(tl: TransportLayer, value: BigInteger) { val bytes = value.toByteArray() tl.transmit(Array(bytes.size) { i -> bytes[i].toUByte() }) } @@ -105,7 +105,7 @@ class OutMessage(val type: NinePMessageType, val tag: UShort, val fieldNames: Li * @param value The string. * @throws IllegalArgumentException if the value of the string's size does not fit into 2 bytes. */ - private fun writeString(tl: TransportLayer, value: String) { + fun writeString(tl: TransportLayer, value: String) { require(value.length <= 2.0.pow(16.0) - 1) writeInteger(tl, value.length.toBigInteger()) val bytes = value.toByteArray() -- cgit v1.2.3