docs: private void readHeader(java.io.RandomAccessFile logFile)
                      throws ObjectManagerException
      {
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this,
                          cclass,
                          "readHeader",
                          new Object[] { logFile });
  
          boolean validHeader = false; // True if the header is valid
          try {
              logFile.seek(0); // Start reading at the head of the file.
              byte[] headerBytes = new byte[headerLength];
  
              for (int i = 1; i <= 2 && !validHeader; i++) {
                  logFile.readFully(headerBytes);
                  validHeader = FileLogInput.restoreSectorBits(headerBytes, headerBytes[5]);
  
                  if (validHeader) {
                      java.io.ByteArrayInputStream byteArrayInputStream = new java.io.ByteArrayInputStream(headerBytes);
                      java.io.DataInputStream inputStream = new java.io.DataInputStream(byteArrayInputStream);
  
                      inputStream.skipBytes(1);
                      instanceVersion = inputStream.readInt();
                      sectorByte = inputStream.readByte();
  
                      // Read a known number of signature charaters. 
                      char[] signatureRead = new char[signature.length()];
                      for (int ichar = 0; ichar < signature.length(); ichar++)
                          signatureRead[ichar] = inputStream.readChar();
  
                      startByteAddress = inputStream.readLong();
                      fileSize = inputStream.readLong();
                      headerSequence = inputStream.readLong();
                      headerWriteTime = inputStream.readLong();
  
                      // Check the signature.
                      if (!(new String(signatureRead).equals(signature))) {
                          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                              trace.exit(this,
                                         cclass,
                                         "readheader"
                                         , new Object[] { signatureRead });
                          throw new InvalidLogFileSignatureException(this,
                                                                     new String(signatureRead), signature);
                      } // if(!signatureRead).equals(signature))).
  
                      if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                          trace.debug(this,
                                      cclass,
                                      "readheader",
                                      new Object[] { new Integer(instanceVersion), new Byte(sectorByte)
                                                    , new Long(startByteAddress), new Long(fileSize)
                                                    , new Long(headerSequence), new java.util.Date(headerWriteTime) }
                                          );
                  } // if (validHeader).
              } // for 2 log headers.
  
          } catch (java.io.EOFException exception) {
              // No FFDC Code Needed.
              ObjectManager.ffdc.processException(this, cclass, "readHeader", exception, "1:188:1.8");
  
              if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                  trace.exit(this,
                             cclass,
                             "readHeader",
                             exception);
              throw new LogFileExhaustedException(this, exception);
  
          } catch (java.io.IOException exception) {
              // No FFDC Code Needed.
              ObjectManager.ffdc.processException(this, cclass, "readHeader", exception, "1:199:1.8");
  
              if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                  trace.exit(this,
                             cclass,
                             "readHeader",
                             exception);
              throw new PermanentIOException(this,
                                             exception);
          } // catch java.io.IOException.
  
          if (!validHeader) {
              LogFileHeaderCorruptException logFileHeaderCorruptException = new LogFileHeaderCorruptException(this);
              ObjectManager.ffdc.processException(this, cclass, "readHeader", logFileHeaderCorruptException, "1:212:1.8");
              if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                  trace.exit(this,
                             cclass,
                             "readHeader");
              throw logFileHeaderCorruptException;
          } // if (validHeader).
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this,
                         cclass,
                         "readHeader");
      }