corda / net.corda.core.utilities / ByteSequence / slice

slice

fun slice(start: Int = 0, end: Int = size): ByteBuffer

A new read-only ByteBuffer view of this sequence or part of it. If start or end are negative then IllegalArgumentException is thrown, otherwise they are clamped if necessary. This method cannot be used to get bytes before offset or after offset+size, and never makes a new array.