code: protected int fillBuffer(byte[] buffer,
                               int offset,
                               int length)
                      throws ObjectManagerException {
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this,
                          cclass,
                          "fillBuffer");
  
          if (buffers == null)
              buffers = getBuffers();
  
          // Only copy the header data, the rest is just padding.
          if (bufferCursor == 0) {
              int lengthToCopy = Math.min(buffers[bufferCursor].getCount() - bufferByteCursor,
                                          length);
              System.arraycopy(buffers[bufferCursor].getBuffer(),
                               bufferByteCursor,
                               buffer,
                               offset,
                               lengthToCopy);
              offset = offset + lengthToCopy;
              length = length - lengthToCopy;
              bufferByteCursor = bufferByteCursor + lengthToCopy;
              if (length > 0) { // Room for some more?
                  bufferCursor++;
                  bufferByteCursor = 0;
              }
          } // if (bufferCursor == 0).
  
          // Skip anything else asked for.
          if (length > 0) {
              int lengthToCopy = Math.min(totalSize - overhead - bufferByteCursor,
                                          length);
  
              offset = offset + lengthToCopy;
              bufferByteCursor = bufferByteCursor + lengthToCopy;
          } // if (length > 0).
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this,
                         cclass,
                         "fillBuffer",
                         "return=" + offset);
          return offset;
      }
docs: Fills a buffer with bytes in the next part serialized LogRecord.
  
  @param buffer we are to put the next part of this logRecord into.
  @param offset into the buffer where we are to put the next part of this LogRecord.
  @param length of the logBuffer we may fill this time round. If it is not
  sufficient to contain the whole logRecord.
  @return int the new offset once the buffer has been filled.
  @throws ObjectManagerException