code: public long write(short type, byte[][] records) throws IOException {
  		maybeWritten();
  		long referenceKey = this.randomAccess.position();
  		// Number of records ....
  		this.randomAccess.writeInt(records.length);
  
  		// write the type of the recods ...
  		this.randomAccess.writeShort(type);
  
  		for (int i = 0; i < records.length; i++) {
  			if (records[i] == null) {
  				throw new IllegalArgumentException("Records[" + i + "]==null");
  			}
  			this.randomAccess.writeInt(records[i].length);
  			this.randomAccess.write(records[i]);
  		}
  		this.randomAccess.commit();
  		return referenceKey;
  	}
docs: <pre>
  +-- length of records[0]
  +-- data of records[0]
  +-- length of records[1]
  +-- data of records[1]
  . . .
  
  </pre>
  
  this format ensures that the record could be recovered
  
  @param type
  a record type defined in LogRecordType.
  @param records
  @return the file position before writing the data
  @throws IOException