code: public void append(byte[] bytes) throws IOException {
          if (readonly) {
              throw new UnsupportedOperationException(RO_MSG);
          }
  
          if (bytes.length != recordSize) {
              final String fmt = "invalid write of %d bytes, expected %d";
              final String msg = format(fmt, bytes.length, recordSize);
              throw new InvalidArgument(msg);
          }
          raf.write(bytes);
  
          // write succeeded - adjust size accordingly
          size += bytes.length;
          recordCt = size / recordSize - 1;
      }
docs: Appends a record to this record file, recalculating the
  {@link #getSize() size} and {@link #getRecordCount() record count}.
  
  @param bytes {@code byte[]} with length {@link #getRecordSize()}
  @throws IOException Thrown if an I/O error occurs during write>
  @throws InvalidArgument Thrown if the length of {@code bytes} is not
  equal to the {@link #getRecordSize()}
  @throws UnsupportedOperationException Thrown if the mode is set to
  read-only