Skip to main content

SealedTextSegment

A read-only view over a segment which has just been sealed, i.e. it is full and no more lines will ever be written to it.

The bytes view points directly into the buffer's memory and is only valid during the synchronous onSegmentSealed call. Consumers which need the data beyond that call must either copy it (e.g. bytes.slice()) or take ownership of the segment by returning true from onSegmentSealed.

Properties​

PropertyTypeDescription
bytesUint8Array<ArrayBuffer>The UTF-8 encoded, newline separated lines held by the segment.
lineCountnumberThe number of lines held by the segment.