home *** CD-ROM | disk | FTP | other *** search
- package netscape.applet;
-
- import java.io.BufferedOutputStream;
- import java.io.InputStream;
- import java.io.PrintStream;
-
- class Console {
- ConsoleFrame frame;
- private InputStream realIn;
- private PrintStream realOut;
- private PrintStream realErr;
-
- Console() {
- SecurityManager.enablePrivilege("UniversalTopLevelWindow");
- this.frame = new ConsoleFrame(this);
- SecurityManager.revertPrivilege();
- ConsoleInputStream var1 = new ConsoleInputStream(this);
- PrintStream var2 = new PrintStream(new BufferedOutputStream(new ConsoleOutputStream(this), 128), true);
- setSystemIO(var1, var2, var2);
- SecurityManager.enablePrivilege("UniversalPropertyRead");
- var2.println(System.getProperty("java.vendor") + " -- Java " + System.getProperty("java.version"));
- SecurityManager.revertPrivilege();
- var2.println("Type '?' for options.");
- var2.flush();
- }
-
- private static native void setSystemIO(InputStream var0, PrintStream var1, PrintStream var2);
-
- static native void dumpNSPRInfo();
-
- static native void dumpMemory(boolean var0);
-
- static native void dumpMemorySummary();
-
- static native void checkpointMemory();
-
- static native void dumpApplicationHeaps();
-
- static native void debugWrite(String var0);
-
- void reset() {
- this.frame.reset();
- }
-
- void show() {
- if (!this.frame.isVisible()) {
- this.frame.show();
- MozillaAppletContext.setConsoleState(1);
- }
-
- }
-
- void hide() {
- if (this.frame.isVisible()) {
- this.frame.hide();
- MozillaAppletContext.setConsoleState(0);
- }
-
- }
- }
-