writeByteData method
Returns a length
-long native ByteData view beginning at
readerIndex (inclusive) and increments the writerIndex by
length
.
Exceptions:
-
WriteIndexOutOfRangeException if the current writer index is outside of the bounds of the buffer.
-
BufferOverflowException if the length of the resulting bytes would overflow the buffer.
Implementation
ByteData writeByteData(int length) {
ensureWritable(length);
assertWriteable(writerIndex, length);
try {
return viewByteData(writerIndex, length);
} finally {
writerIndex += length;
}
}