Dumps all of the threads' current information to an output stream.

@param out an output stream
15358
public void getThreadDump(OutputStream out) {
    final ThreadInfo[] threads = this.threads.dumpAllThreads(true, true);
    final PrintWriter writer = new PrintWriter(out, true);

    for (int ti = threads.length - 1; ti >= 0; ti--) {
      final ThreadInfo t = threads[ti];
      writer.printf("%s id=%d state=%s",
        t.getThreadName(),
        t.getThreadId(),
        t.getThreadState());

      final LockInfo lock = t.getLockInfo();
      if ((lock != null) && (t.getThreadState() != State.BLOCKED)) {
        writer.printf("\n    - waiting on <0x%08x> (a %s)",
          lock.getIdentityHashCode(),
          lock.getClassName());
        writer.printf("\n    - locked <0x%08x> (a %s)",
          lock.getIdentityHashCode(),
          lock.getClassName());
      } else if ((lock != null) && (t.getThreadState() == State.BLOCKED)) {
        writer.printf("\n    - waiting to lock <0x%08x> (a %s)",
          lock.getIdentityHashCode(),
          lock.getClassName());
      }

      if (t.isSuspended()) {
        writer.print(" (suspended)");
      }

      if (t.isInNative()) {
        writer.print(" (running in native)");
      }

      writer.println();
      if (t.getLockOwnerName() != null) {
        writer.printf("     owned by %s id=%d\n", t.getLockOwnerName(), t.getLockOwnerId());
      }

      final StackTraceElement[] elements = t.getStackTrace();
      final MonitorInfo[] monitors = t.getLockedMonitors();

      for (int i = 0; i < elements.length; i++) {
        final StackTraceElement element = elements[i];
        writer.printf("    at %s\n", element);
        for (int j = 1; j < monitors.length; j++) {
          final MonitorInfo monitor = monitors[j];
          if (monitor.getLockedStackDepth() == i) {
            writer.printf("      - locked %s\n", monitor);
          }
        }
      }
      writer.println();

      final LockInfo[] locks = t.getLockedSynchronizers();
      if (locks.length > 0) {
        writer.printf("    Locked synchronizers: count = %d\n", locks.length);
        for (LockInfo l : locks) {
          writer.printf("      - %s\n", l);
        }
        writer.println();
      }
    }

    writer.println();
    writer.flush();
  }
89188
public void write(OutputStream out)
         throws IOException
    {
        Writer writer = new OutputStreamWriter(out);
        write(writer);
        writer.flush();
    }
23930
public synchronized void dump() {
        if (log.isDebugEnabled()) {
            log.debug("dumping allocations {}", events.size());
            for (Entry<BaseEvent, Info> entry : events.entrySet()) {
                log.debug("{} {}", entry.getKey(), entry.getValue().refcount);
            }
        }
    }
835768
public void dumpTo(OutputStream out)
    {
        PrintWriter writer;
        try {
            writer = new PrintWriter(new OutputStreamWriter(out, "utf-8"));
        } catch (UnsupportedEncodingException e) {
            writer = new PrintWriter(out);
        }
        recursiveDump(root, 0, writer);
        writer.close();
    }
696672
public void writeTo(final CodedOutputStream output)
                      throws IOException {
    for (int i = 0; i < fields.getNumArrayEntries(); i++) {
      final Map.Entry<FieldDescriptorType, Object> entry =
          fields.getArrayEntryAt(i);
      writeField(entry.getKey(), entry.getValue(), output);
    }
    for (final Map.Entry<FieldDescriptorType, Object> entry :
         fields.getOverflowEntries()) {
      writeField(entry.getKey(), entry.getValue(), output);
    }
  }
1030034
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        out.writeInt(size());
        for (E value : this) {
            out.writeObject(value);
        }
    }
1097789
public void dump() {
        /*
         * Defect 88284
         * Performance hit of creating data structure, which occupies memory
         * even though if the trace is not turned ON. So suppress creation
         * by checking trace and debug flags.
         */
        if (!TraceComponent.isAnyTracingEnabled() || !(tc.isDumpEnabled() ||
                                                       tc.isDebugEnabled())) {
            return;
        }

        introspect(new TrDumpWriter(tc));
    }
215947
public void dump_memory(Writer out)
    throws IOException
    {
        int qlist_num;

        out.write("First quick size: " + first_quick_size + "\n");
        out.write("Last quick size: " + last_quick_size + "\n");
        out.write("Grain size: " + grain_size + "\n");
        out.write("Acceptable waste: " + acceptable_waste + "\n");
        out.write("Tail pointer in memory: " + tail_ptr + "\n");
        out.write("First allocatable byte: " + start() + "\n\n");
        out.write("Free lists from memory structures\n");
        for (qlist_num = 0; qlist_num <= last_ql_index;
            qlist_num++) {
            out.write(qlist_num + ": ");
            out.write("Length = " +
                      ql_heads[qlist_num].length + "; ");
            print_memory_freelist(out, ql_heads[qlist_num].first_block);
        };
        out.write("Nonempty free lists: " + nonempty_lists + "\n");
        out.write("Tail pointer in memory: " + tail_ptr + "\n");
        out.write("First allocatable byte: " + start() + "\n\n");
    }
1285267
public void serialize(final OutputStream out) throws IOException {
    final Writer writer = new BufferedWriter(new OutputStreamWriter(out));
    this.seqModel.serialize(out);
    writer.flush();
  }
335607
public void reportSummary(@WillClose OutputStream out) throws IOException {
        XMLOutput xmlOutput = new OutputStreamXMLOutput(out);
        try {
            writeXML(xmlOutput);
        } finally {
            xmlOutput.finish();
        }
    }
1346642
public void save(ObjectOutputStream out) throws IOException
    {
        out.writeObject(base);
        out.writeObject(check);
        out.writeObject(fail);
        out.writeObject(output);
        out.writeObject(l);
    }
778439
public void serialize(final OutputStream out) throws IOException {
    final Writer writer = new BufferedWriter(new OutputStreamWriter(out));
    for (final Map.Entry<String, String> entry : this.multiMap.entries()) {
      writer.write(
          entry.getKey() + IOUtils.TAB_DELIMITER + entry.getValue() + "\n");
    }
    writer.flush();
  }
69669
static void dump(@Nullable String title) {
        if (title != null && title.length() > 0) {
            System.out.printf("Start TransmittableThreadLocal[%s] Dump...\n", title);
        } else {
            System.out.println("Start TransmittableThreadLocal Dump...");
        }

        for (Map.Entry<TransmittableThreadLocal<?>, ?> entry : holder.get().entrySet()) {
            final TransmittableThreadLocal<?> key = entry.getKey();
            System.out.println(key.get());
        }
        System.out.println("TransmittableThreadLocal Dump end!");
    }
1343849
public void save(DataOutputStream out) throws Exception
    {
        out.writeInt(size);
        for (int i = 0; i < size; i++)
        {
            out.writeInt(base[i]);
            out.writeInt(check[i]);
            out.writeInt(fail[i]);
            int output[] = this.output[i];
            if (output == null)
            {
                out.writeInt(0);
            }
            else
            {
                out.writeInt(output.length);
                for (int o : output)
                {
                    out.writeInt(o);
                }
            }
        }
        out.writeInt(l.length);
        for (int length : l)
        {
            out.writeInt(length);
        }
    }
67238
private void writeObject(java.io.ObjectOutputStream out)
                    throws IOException
    {
        out.defaultWriteObject();
        // write out the header information
        out.write(eyecatcher);
        out.writeShort(platform);
        out.writeShort(versionID);

        // write out the data
        out.writeObject(server);
        out.writeObject(allWrappers);
        out.writeInt(chunkSize);
    }
672502
public static void dumpAll(Iterator<? extends Object> data, Writer output) {
    getSnakeYaml().dumpAll(data, output);
  }
1075895
public void write(DataOutput out) throws IOException {
    out.writeInt(VERSION);
    out.writeInt(this.nbHash);
    out.writeByte(this.hashType);
    out.writeInt(this.vectorSize);
  }