code: boolean endEntry(boolean endOfRecord) {
          // Check to see if we actually have an entry started.
          if (this.writeEntryStartIndex >= 0) {
              int entryLength = this.writePosition - this.writeEntryStartIndex - WriteEntryHeader.HEADER_SIZE;
              assert entryLength >= 0 : "entryLength is negative.";
  
              this.writeEntryHeader.setEntryLength(entryLength);
              this.writeEntryHeader.setLastRecordEntry(endOfRecord);
              this.writeEntryHeader.serialize();
              this.writeEntryHeader = null;
              this.writeEntryStartIndex = -1;
          }
  
          // Check to see if we have enough room to begin another entry.
          return getAvailableLength() >= MIN_ENTRY_LENGTH_NEEDED;
      }
docs: Indicates that the currently open DataFrame Entry can be ended.
  
  @param endOfRecord If true, this entry will be marked as the last entry in a record (records can be split across
  multiple frames, and this helps ensure that, upon read, the records are recomposed ending with
  the right DataFrame Entry).
  @return True if we have any more space (to start a new record) in this DataFrame, false otherwise.