Print a dump of the state.

@param printWriter to be written to.
194596
public void print(java.io.PrintWriter printWriter)
    {
        printWriter.println("ObjectManager"
                            + "(String)");
        printWriter.println();
        objectManagerState.logOutput.print(printWriter);
    }
1359733
static void dumpConfig(final String name, final Config config, final PrintWriter printWriter) {

        if (printWriter == null) {
            throw new IllegalArgumentException("writer argument cannot be null");
        }

        printWriter.println();
        printWriter.println("^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^  ^");
        printWriter.println(name + " " + config.root().origin());
        printWriter.println(config.root().render(configRenderOptions));
        printWriter.flush();
    }
104751
private void printErrLine(int pos, PrintWriter writer) {
        String line = (source == null ? null : source.getLine(pos));
        if (line == null)
            return;
        int col = source.getColumnNumber(pos, false);

        printRawLines(writer, line);
        for (int i = 0; i < col - 1; i++) {
            writer.print((line.charAt(i) == '\t') ? "\t" : " ");
        }
        writer.println("^");
        writer.flush();
    }
355401
public void dumpContext(PrintWriter writer) {
        try {
            NamingEnumeration<NameClassPair> list = context.list("/");
            writer.print("\n{\n  name: \"");
            /*writer.print(this.namespace);
            writer.print(" ");*/
            writer.print(this.root);
            writer.println("\",\n  children: [");
            enumerate(list, "/", writer);
            writer.println("]}");
            writer.flush();
        } catch (NamingException e) {
            e.printStackTrace(writer);
        }
    }
913337
protected void write(PrintWriter writer, String indent) {
        writer.print("(");

        if (!isEmpty()) {
            Token root = getRoot(true);
            int type = root.getType();
            int meaning = root.getMeaning();


            //
            // Display our type, text, and (optional) meaning

            writer.print(Types.getDescription(type));

            if (meaning != type) {
                writer.print(" as ");
                writer.print(Types.getDescription(meaning));
            }

            if (getStartLine() > -1) {
                writer.print(" at " + getStartLine() + ":" + getStartColumn());
            }

            String text = root.getText();
            int length = text.length();
            if (length > 0) {
                writer.print(": ");
                if (length > 40) {
                    text = text.substring(0, 17) + "..." + text.substring(length - 17, length);
                }

                writer.print(" \"");
                writer.print(text);
                writer.print("\" ");
            } else if (children() > 0) {
                writer.print(": ");
            }


            //
            // Recurse to display the children.

            int count = size();
            if (count > 1) {
                writer.println("");

                String indent1 = indent + "  ";
                String indent2 = indent + "   ";
                for (int i = 1; i < count; i++) {
                    writer.print(indent1);
                    writer.print(i);
                    writer.print(": ");

                    get(i, true).write(writer, indent2);
                }

                writer.print(indent);
            }
        }

        if (indent.length() > 0) {
            writer.println(")");
        } else {
            writer.print(")");
        }
    }
1063965
public static void println(PrintWriter self, Object value) {
        self.println(InvokerHelper.toString(value));
    }
1329989
public void dumpJson(final PrintWriter out) {
        out.append("{");
        visitVariables(new Visitor() {
            int count = 0;

            public void visit(Variable var) {
                if (count++ > 0) { out.append(", "); }
                out.append(var.getName()).append("='").append(String.valueOf(var.getValue())).append("'");
            }
        });
        out.append("}");
    }
1024099
public final void dumpTo(StringBuilder builder) {
      StringWriter stringWriter = new StringWriter();
      globalContainer.dumpTo(new PrintWriter(stringWriter));
      builder.append(stringWriter.getBuffer());
   }
1203189
public void write(PrintWriter output, Janitor janitor) {
        String description = "General error during " + owner.getPhaseDescription() + ": ";

        String message = cause.getMessage();
        if (message != null) {
            output.println(description + message);
        } else {
            output.println(description + cause);
        }
        output.println();

        //if (verbose) {
        cause.printStackTrace(output);
        //}
    }
502628
private void printResultInfo(Status resultStatus, PrintWriter reportWriter) {
    switch (resultStatus) {
      case FAIL_TO_FIND_CLASS:
        reportWriter.println(FAIL_TO_FIND_CLASS_MESSAGE);
        reportWriter.println(TEST_FAILED_MESSAGE);
        break;
      case FAIL_TO_FIND_FS:
        reportWriter.println(FAIL_TO_FIND_FS_MESSAGE);
        reportWriter.println(TEST_FAILED_MESSAGE);
        break;
      case FAIL_TO_SUPPORT_HA:
        reportWriter.println(FAIL_TO_SUPPORT_HA_MESSAGE);
        reportWriter.println(TEST_FAILED_MESSAGE);
        break;
      default:
        reportWriter.println(TEST_PASSED_MESSAGE);
        break;
    }
  }
954800
public boolean printData(PrintWriter out, int iPrintOptions)
    {
        this.addHiddenParam(out, TrxMessageHeader.LOG_TRX_ID, this.getProperty(TrxMessageHeader.LOG_TRX_ID));
        return super.printData(out, iPrintOptions);   // Don't print
    }
504759
static void printList(final PrintWriter pw, final List<?> l) {
        for (int i = 0; i < l.size(); ++i) {
            Object o = l.get(i);
            if (o instanceof List) {
                printList(pw, (List<?>) o);
            } else {
                pw.print(o.toString());
            }
        }
    }
593203
public synchronized void print(java.io.PrintWriter printWriter)
    {
        super.print(printWriter);

        try {
            printWriter.println("State Dump for:" + cclass.getName()
                                + "\n storeFile=" + storeFile + "(java.io.RandomaccessFile)"
                                + "\n storeFileSizeUsed=" + storeFileSizeUsed + "(long)"
                                + " storeFileSizeAllocated=" + storeFileSizeAllocated + "(long)"
                                + " reservedSize=" + reservedSize + "(long)"
                                + " directoryReservedSize=" + directoryReservedSize + "(long)"
                                + "\n minimumStoreFileSize=" + minimumStoreFileSize
                                + " maximumStoreFileSize=" + maximumStoreFileSize
                                + "\n ((Directory.Node)directory.root).byteAddress=" + ((Directory.Node) directory.root).byteAddress
                                + "((Directory.Node)directory.root).length=" + ((Directory.Node) directory.root).length
                                + " directory.size()=" + directory.size()
                                + "\n freeSpaceStoreArea=" + freeSpaceStoreArea);
            printWriter.println();

            // directory.print(printWriter);
            // printWriter.println();

            printWriter.println("managedObjectsToWrite...");
            for (java.util.Iterator managedObjectIterator = managedObjectsToWrite.values().iterator(); managedObjectIterator.hasNext();) {
                ManagedObject managedObject = (ManagedObject) managedObjectIterator.next();
                printWriter.println(managedObject.toString());
            } // for ... managedObjectsToWrite.

            printWriter.println("tokensToDelete...");
            for (java.util.Iterator tokenIterator = tokensToDelete.values().iterator(); tokenIterator.hasNext();) {
                Token token = (Token) tokenIterator.next();
                printWriter.println(token.toString());
            } // for ... tokensToDelete.

            printWriter.println("directory...");
            printWriter.println("identifier          byteAddress         length");
            printWriter.println(("directoryRoot       ")
                                + (((Directory.Node) directory.root).byteAddress + "                    ").substring(0, 20)
                                + (((Directory.Node) directory.root).length + "                    ").substring(0, 20)
                            );
            for (Iterator storeAreaIterator = directory.entrySet().iterator(); storeAreaIterator.hasNext();) {
                Directory.StoreArea storeArea = (Directory.StoreArea) storeAreaIterator.next();
                printWriter.println((storeArea.identifier + "                    ").substring(0, 20)
                                    + (storeArea.byteAddress + "                    ").substring(0, 20)
                                    + (storeArea.length + "                    ").substring(0, 20)
                                );
                Directory.Node child = (Directory.Node) storeArea.getChild();
                if (child != null) {
                    printWriter.println(("directoryMetaData   ")
                                        + (child.byteAddress + "                    ").substring(0, 20)
                                        + (child.length + "                    ").substring(0, 20)
                                    );
                    if (storeArea.next.getKey() == null) {
                        storeArea = (Directory.StoreArea) storeArea.next;
                        child = (Directory.Node) storeArea.getChild();
                        printWriter.println(("directoryMetaData   ")
                                            + (child.byteAddress + "                    ").substring(0, 20)
                                            + (child.length + "                    ").substring(0, 20)
                                        );
                    } // if (storeArea.next.getKey() == null).                    
                } // if (child != null).
            } // for ... directory.
        } catch (ObjectManagerException objectManagerException) {
            // No FFDC code needed.
            printWriter.println("Caught objectManagerException=" + objectManagerException);
            objectManagerException.printStackTrace(printWriter);
        } // try...

        printWriter.println("cachedManagedObjects...");
        for (int i = 0; i < cachedManagedObjects.length; i++) {
            if (cachedManagedObjects[i] != null)
                printWriter.println(i + " " + cachedManagedObjects[i].toString());
        } // for cachedManagedObjects.

        printWriter.println("freeSpaceByLength.size()=" + freeSpaceByLength.size() + "\n... Address(long) Length(Long)");
        for (java.util.Iterator iterator = freeSpaceByLength.iterator(); iterator.hasNext();) {
            FreeSpace freeSpace = (FreeSpace) iterator.next();
            printWriter.println(freeSpace.address + " " + freeSpace.length);
        } // for freeSpaceAddress.

        printWriter.println("newFreeSpace.size()=" + newFreeSpace.size() + "\n... Address(long) Length(Long)");
        for (java.util.Iterator freeSpaceIterator = newFreeSpace.iterator(); freeSpaceIterator.hasNext();) {
            Directory.StoreArea storeArea = (Directory.StoreArea) freeSpaceIterator.next();
            printWriter.println(storeArea.byteAddress + " " + storeArea.length);
        } // for newFreeSpace.

    }
880552
public void dump(Writer writer) {
        PrintWriter printer = new PrintWriter(writer);
        for (String sectionType : sectionsByType.keySet()) {
            int sectionNumber = 0;
            for (Section section : sectionsByType.get(sectionType)) {
                printer.printf("%s [%d]%n", sectionType, sectionNumber++);
                for (String key : section) {
                    printer.printf(" %30s -> %s%n", key, section.value(key));
                }
            }
            printer.println();
        }
        try {
            writer.flush();
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
317542
public void printStackTrace(PrintWriter printWriter) {
    if (mStackTrace == null) {
      printWriter.print(getMessage());
    }
    else {
      printWriter.print(mStackTrace);
    }
  }
761554
protected void write(String toWrite) throws IOException  {
    if(!okToWrite)
      throw new IOException("file not open for writing.");

    if(printToScreen)
      System.out.print(toWrite);

    try {
      fw.write(toWrite);
    } catch (IOException e) {
      okToWrite = false;
      throw e;
    }
  }
87521
public void write(PrintWriter writer) {
        this.output = writer;
        dispatch(base, false);
        writer.flush();
    }