writeByteArray with offset and length
This commit is contained in:
parent
16666055ba
commit
786dcfbe53
@ -4,7 +4,7 @@ kotlin.code.style=official
|
||||
specifyKotlinAsDependency=false
|
||||
|
||||
projectGroup=ru.dbotthepony.kommons
|
||||
projectVersion=2.9.16
|
||||
projectVersion=2.9.17
|
||||
|
||||
guavaDepVersion=33.0.0
|
||||
gsonDepVersion=2.8.9
|
||||
|
@ -316,6 +316,12 @@ fun OutputStream.writeByteArray(value: ByteArray) {
|
||||
write(value)
|
||||
}
|
||||
|
||||
fun OutputStream.writeByteArray(value: ByteArray, offset: Int, length: Int) {
|
||||
Objects.checkFromIndexSize(offset, value.size, length)
|
||||
writeVarInt(length)
|
||||
write(value, offset, length)
|
||||
}
|
||||
|
||||
fun OutputStream.writeByteKey(key: ByteKey) {
|
||||
key.write(this)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user