code: public WriteableLogRecord getWriteableLogRecord(int recordLength, long sequenceNumber) throws InternalLogException
      {
  
          if (!_headerFlushedFollowingRestart)
          {
              // ensure header is updated now we start to write records for the first time
              // synchronization is assured through locks in LogHandle.getWriteableLogRecord
              writeFileHeader(true);
              _headerFlushedFollowingRestart = true;
          }
  
          if (tc.isEntryEnabled())
              Tr.entry(tc, "getWriteableLogRecord", new Object[] { new Integer(recordLength), new Long(sequenceNumber), this });
  
          // Create a slice of the file buffer and reset its limit to the size of the WriteableLogRecord.
          // The view buffer's content is a shared subsequence of the file buffer.
          // No other log records have access to this log record's view buffer.
          ByteBuffer viewBuffer = (ByteBuffer) _fileBuffer.slice().limit(recordLength + WriteableLogRecord.HEADER_SIZE);
          WriteableLogRecord writeableLogRecord = new WriteableLogRecord(viewBuffer, sequenceNumber, recordLength, _fileBuffer.position());
  
          // Advance the file buffer's position to the end of the newly created WriteableLogRecord
          _fileBuffer.position(_fileBuffer.position() + recordLength + WriteableLogRecord.HEADER_SIZE);
  
          _outstandingWritableLogRecords.incrementAndGet();
          if (tc.isEntryEnabled())
              Tr.exit(tc, "getWriteableLogRecord", writeableLogRecord);
          return writeableLogRecord;
      }
docs: Get a new WritableLogRecord for the log file managed by this LogFileHandleInstance.
  The size of the record must be specified along with the record's sequence number.
  It is the caller's responsbility to ensure that both the sequence number is correct
  and that the record written using the returned WritableLogRecord is of the given
  length.
  
  @param recordLength The length of the record to be created
  @param sequenceNumber The newly created record's sequence number
  @return WriteableLogRecord A new writeable log record of the specified size