code: @Deprecated
      public void writeMetadata(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.seek(0);
          raf.write(bytes);
      }
docs: Writes metadata to this record file overwriting existing metadata.
  
  @param bytes The metadata bytes to write
  @throws IOException Thrown if an I/O error occurs during I/O seeks or
  writes
  @throws InvalidArgument Thrown if a write of anything other than the size
  of the record is requested
  @throws UnsupportedOperationException Thrown if the mode is set to
  read-only
  @deprecated Explicitly writing the metadata record can cause
  inconsistent {@link RecordFile record files} if used incorrectly.
  Metadata for the {@link RecordFile record file} should only be written
  on construction.
  @see RecordFile#RecordFile(File, RecordMode, Column...)