private void writeMetaTable(TableEntry entry){
  TempBuffer tBuf=TempBuffer.create();
  byte[] buffer=tBuf.buffer();
  int offset=0;
  buffer[offset++]=CODE_TABLE;
  offset+=BitsUtil.write(buffer,offset,entry.tableKey());
  offset+=BitsUtil.writeInt16(buffer,offset,entry.rowLength());
  offset+=BitsUtil.writeInt16(buffer,offset,entry.keyOffset());
  offset+=BitsUtil.writeInt16(buffer,offset,entry.keyLength());
  byte[] data=entry.data();
  offset+=BitsUtil.writeInt16(buffer,offset,data.length);
  System.arraycopy(data,0,buffer,offset,data.length);
  offset+=data.length;
  int crc=_nonce;
  crc=Crc32Caucho.generate(crc,buffer,0,offset);
  offset+=BitsUtil.writeInt(buffer,offset,crc);
  try (OutStore sOut=openWrite(_metaOffset,offset)){
    sOut.write(_metaOffset,buffer,0,offset);
    _metaOffset+=offset;
  }
   tBuf.free();
  if (_metaTail - _metaOffset < 16) {
    writeMetaContinuation();
  }
}

private void writeMetaTable ( TableEntry entry ) { TempBuffer tBuf = TempBuffer . create ( ) ; byte [ ] buffer = tBuf . buffer ( ) ; int offset = 0 ; buffer [ offset ++ ] = CODE_TABLE ; offset += BitsUtil . write ( buffer , offset , entry . tableKey ( ) ) ; offset += BitsUtil . writeInt16 ( buffer , offset , entry . rowLength ( ) ) ; offset += BitsUtil . writeInt16 ( buffer , offset , entry . keyOffset ( ) ) ; offset += BitsUtil . writeInt16 ( buffer , offset , entry . keyLength ( ) ) ; byte [ ] data = entry . data ( ) ; offset += BitsUtil . writeInt16 ( buffer , offset , data . length ) ; System . arraycopy ( data , 0 , buffer , offset , data . length ) ; offset += data . length ; int crc = _nonce ; crc = Crc32Caucho . generate ( crc , buffer , 0 , offset ) ; offset += BitsUtil . writeInt ( buffer , offset , crc ) ; try ( OutStore sOut = openWrite ( _metaOffset , offset ) ) { sOut . write ( _metaOffset , buffer , 0 , offset ) ; _metaOffset += offset ; } tBuf . free ( ) ; if ( _metaTail - _metaOffset < 16 ) { writeMetaContinuation ( ) ; } }
metadata for a table entry .
