public void serializeToPagesWithoutLength ( BinaryRow record , AbstractPagedOutputView out ) throws IOException { int remainSize = record . getSizeInBytes ( ) ; int posInSegOfRecord = record . getOffset ( ) ; int segmentSize = record . getSegments ( ) [ 0 ] . size ( ) ; for ( MemorySegment segOfRecord : record . getSegments ( ) ) { int nWrite = Math . min ( segmentSize - posInSegOfRecord , remainSize ) ; assert nWrite > 0 ; out . write ( segOfRecord , posInSegOfRecord , nWrite ) ; // next new segment. posInSegOfRecord = 0 ; remainSize -= nWrite ; if ( remainSize == 0 ) { break ; } } checkArgument ( remainSize == 0 ) ; }
Serialize row to pages without row length . The caller should make sure that the fixed - length parit can fit in output s current segment no skip check will be done here .