binary-streams / loggersoft.kotlin.streams / ByteArea / <init>

<init>

ByteArea(size: Int, offset: Int = 0)

Constructs new ByteArray with specified size and ByteArea over it.

ByteArea(inline buffer: ByteArray, size: Int, offset: Int = 0)

Represents area inside byte array buffer with specified offset and size.

Parameters

buffer - the source buffer.

size - the size of byte area.

offset - start index in buffer.

Exceptions

IllegalArgumentException - if offset is negative, size is zero or negative, buffer is empty or area is out of bounds.

Author
Alexander Kornilov (akornilov.82@gmail.com).