private void upgradeLeafBlock ( ReadStream is , TableEntry10 table , TableUpgrade upgradeTable , Page10 page ) throws IOException { TempBuffer tBuf = TempBuffer . create ( ) ; byte [ ] buffer = tBuf . buffer ( ) ; int blobLen = BitsUtil . readInt16 ( is ) ; is . readAll ( buffer , 0 , blobLen ) ; int rowDataLen = BitsUtil . readInt16 ( is ) ; int rowOffset = buffer . length - rowDataLen ; is . readAll ( buffer , rowOffset , rowDataLen ) ; int rowLen = table . rowLength ( ) ; int keyLen = table . keyLength ( ) ; while ( rowOffset < buffer . length ) { int code = buffer [ rowOffset ] & CODE_MASK ; switch ( code ) { case INSERT : rowInsert ( table . row ( ) , upgradeTable , buffer , rowOffset ) ; rowOffset += rowLen ; break ; case REMOVE : rowOffset += keyLen + STATE_LENGTH ; break ; default : System . out . println ( "UNKNOWN: " + Integer . toHexString ( code ) ) ; return ; } } tBuf . free ( ) ; }
Reads data for a leaf .