docs: public synchronized boolean validate(java.io.PrintStream printStream)
                      throws ObjectManagerException
      {
          final String methodName = "validate";
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this,
                          cclass,
                          methodName,
                          new Object[] { printStream });
  
          boolean valid = true; // Until proven otherwise.
  
          valid = directory.validate(printStream);
  
          // Build a map of store areas sorted on the start byteAddress.
          java.util.TreeMap storeAreas = new java.util.TreeMap();
  
          Directory.StoreArea storeArea;
          Directory.StoreArea existing;
          // Load the directory contents.
          for (Iterator directoryIterator = directory.entrySet().iterator(); directoryIterator.hasNext();) {
              storeArea = (Directory.StoreArea) directoryIterator.next();
              existing = (Directory.StoreArea) storeAreas.put(new Long(storeArea.byteAddress),
                                                              storeArea);
              if (existing != null) {
                  printStream.println("storeArea " + storeArea + " payload reused byte Address"
                                      + " storeArea.byteAddress=" + storeArea.byteAddress
                                      + " storeArea.length=" + storeArea.length
                                      + " existing.length=" + existing.length
                                      + " existing.identifier=" + existing.identifier
                                  );
                  valid = false;
              } // if (existing != null).
  
              Directory.Node child = (Directory.Node) storeArea.getChild();
              if (child != null) {
                  // Fake up another store area to mimick any space used by the BTree metadata contain any child below.
                  Directory.StoreArea metaData = directory.makeStoreArea(0, child.byteAddress, child.length);
                  existing = (Directory.StoreArea) storeAreas.put(new Long(metaData.byteAddress),
                                                                  metaData);
  
                  if (existing != null) {
                      printStream.println("storeArea " + storeArea + " child reused byte Address"
                                          + " child.byteAddress=" + child.byteAddress
                                          + " child.length=" + child.length
                                          + " existing.length=" + existing.length
                                          + " existing.identifier=" + existing.identifier
                                      );
                      valid = false;
                  } // if (existing != null).
  
                  // We have a child and so are not a leaf node, check for a final greater than entry.
                  if (storeArea.next.getKey() == null) {
  
                      storeArea = (Directory.StoreArea) storeArea.next;
                      child = (Directory.Node) storeArea.getChild();
                      metaData = directory.makeStoreArea(0, child.byteAddress, child.length);
                      existing = (Directory.StoreArea) storeAreas.put(new Long(metaData.byteAddress),
                                                                      metaData);
                      if (existing != null) {
                          printStream.println("storeArea " + storeArea + " greater than child reused byte Address"
                                              + " child.byteAddress=" + child.byteAddress
                                              + " child.length=" + child.length
                                              + " existing.length=" + existing.length
                                              + " existing.identifier=" + existing.identifier
                                          );
                          valid = false;
                      } //  if (existing != null).
  
                  } // if (storeArea.next.getKey() == null).                    
              } // if (child != null).
          } // For ... directory.
  
          // Add in the root of the directory.
          if (((Directory.Node) directory.root).length != 0) {
              storeArea = directory.makeStoreArea(0,
                                                  ((Directory.Node) directory.root).byteAddress,
                                                  ((Directory.Node) directory.root).length);
              existing = (Directory.StoreArea) storeAreas.put(new Long(storeArea.byteAddress),
                                                              storeArea);
              if (existing != null) {
                  printStream.println("storeArea " + storeArea + " directory root reused byte Address"
                                      + " storeArea.byteAddress=" + storeArea.byteAddress
                                      + " storeArea.length=" + storeArea.length
                                      + " existing.length=" + existing.length
                                      + " existing.identifier=" + existing.identifier
                                  );
                  valid = false;
              } // if (existing != null)  
          } // (((Directory.Node)directory.root).length != 0).
  
          // Add the free space.
          int freeSpaceCount = 0;
          FreeSpace freeSpace = freeSpaceByAddressHead;
          FreeSpace prevFreeSpace = null;
          while (freeSpace != null) {
              storeArea = directory.makeStoreArea(0,
                                                  freeSpace.address,
                                                  freeSpace.length);
              existing = (Directory.StoreArea) storeAreas.put(new Long(storeArea.byteAddress),
                                                              storeArea);
              if (existing != null) {
                  printStream.println("freeSpace storeArea " + storeArea + " reused byte Address"
                                      + " storeArea.byteAddress=" + storeArea.byteAddress
                                      + " storeArea.length=" + storeArea.length
                                      + " existing.length=" + existing.length
                                      + " existing.identifier=" + existing.identifier
                                  );
                  valid = false;
              } // if (existing != null).
  
              // Check the list is structurally sound
              if (freeSpace.prev != prevFreeSpace) {
                  printStream.println("freeSpaceByAddress list invalid" +
                                      " prevFreeSpace=" + prevFreeSpace +
                                      " freeSpace.prev=" + freeSpace.prev);
              }
  
              // Check the list is ordered correctly
              if (prevFreeSpace != null && freeSpace.address <= prevFreeSpace.address) {
                  printStream.println("freeSpaceByAddress list out of order" +
                                      " freeSpace.address=" + freeSpace.address +
                                      " freeSpace.length=" + freeSpace.length +
                                      " prevFreeSpace.address=" + prevFreeSpace.address +
                                      " prevFreeSpace.length=" + prevFreeSpace.length);
              }
  
              prevFreeSpace = freeSpace;
              freeSpace = freeSpace.next;
              freeSpaceCount++;
          } // for freeSpaceCount.
  
          // Check the size of the two views of the free space match
          if (freeSpaceCount != freeSpaceByLength.size()) {
              printStream.println("freeSpaceByAddress.size()=" + freeSpaceCount +
                                  " freeSpaceByLength.size()=" + freeSpaceByLength.size());
              valid = false;
          }
  
          // Add in the freeSpaceStoreArea.
          if (freeSpaceStoreArea != null && freeSpaceStoreArea.length != 0) {
              existing = (Directory.StoreArea) storeAreas.put(new Long(freeSpaceStoreArea.byteAddress),
                                                              freeSpaceStoreArea);
              if (existing != null) {
                  printStream.println("freeSpaceStoreArea " + freeSpaceStoreArea + " reused byte Address"
                                      + " freeSpaceStoreArea.byteAddress=" + freeSpaceStoreArea.byteAddress
                                      + " freeSpaceStoreArea.length=" + freeSpaceStoreArea.length
                                      + " existing.length=" + existing.length
                                      + " existing.identifier=" + existing.identifier
                                  );
                  valid = false;
              } // if (existing != null).  
          } // if (freeSpaceStoreArea != null && freeSpaceStoreArea.length != 0).
  
          // Move through the StoreAreas accounting for all of the space in the file
          // as we go. Start with the header as the previous StoreArea.
          Directory.StoreArea previous = directory.makeStoreArea(0, 0, pageSize * 2);
          for (java.util.Iterator storeAreasIterator = storeAreas.values().iterator(); storeAreasIterator.hasNext();) {
              storeArea = (Directory.StoreArea) storeAreasIterator.next();
              long gap = storeArea.byteAddress - (previous.byteAddress + previous.length);
              if (gap > 0) {
                  printStream.println("previous.byteAddress=" + previous.byteAddress
                                      + " previous.length=" + previous.length
                                      + " gap=" + gap
                                      + " storeArea.byteAddress=" + storeArea.byteAddress
                                      + " storeArea.length=" + storeArea.length
                                  );
                  valid = false;
              } else if (gap < 0) {
                  printStream.println("previous.byteAddress=" + previous.byteAddress
                                      + " previous.length=" + previous.length
                                      + " overlap=" + (-gap)
                                      + " storeArea.byteAddress=" + storeArea.byteAddress
                                      + " storeArea.length=" + storeArea.length
                                  );
                  valid = false;
              }
              previous = storeArea;
          } // For ... storeAreas.
  
          if (storeFileSizeUsed != (previous.byteAddress + previous.length)) {
              printStream.println("storeFileLength not valid"
                                  + " previous.byteAddress + previous.length="
                                  + (previous.byteAddress + previous.length)
                                  + " storeFileSizeUsed=" + storeFileSizeUsed);
              valid = false;
          } // if (storeFileSizeUsed != (previous.byteAddress + previous.length)).  
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this,
                         cclass,
                         methodName,
                         new Object[] { new Boolean(valid) });
          return valid;
      }