diff --git a/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt b/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt index cd07670..75fc06e 100644 --- a/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt +++ b/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt @@ -311,11 +311,17 @@ fun S.writeOptional(value: Optional, writer: S.(V } } +/** + * Writes array's size as variable length integer and then writes its contents + */ fun OutputStream.writeByteArray(value: ByteArray) { writeVarInt(value.size) write(value) } +/** + * Writes array's size as variable length integer and then writes its contents + */ fun OutputStream.writeByteArray(value: ByteArray, offset: Int, length: Int) { Objects.checkFromIndexSize(offset, value.size, length) writeVarInt(length)