Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Package Attributes
netscape.console.Console.Output Class Reference
Inheritance diagram for netscape.console.Console.Output:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Output ()
synchronized void write (int b) throws IOException
synchronized void write (byte[] buffer, int offset, int count) throws IOException
synchronized void flush () throws IOException
synchronized void run ()
 When I/O occurs, it is placed in a StringBuffer, which is flushed in a different thread.

Package Attributes

StringBuffer buffer = new StringBuffer()

Detailed Description

Definition at line 57 of file Console.java.


Constructor & Destructor Documentation

Definition at line 60 of file Console.java.

                              {
                     Thread flusher = new Thread(this, getClass().getName() + "-Flusher");
                     flusher.setDaemon(true);
                     flusher.start();
              }

Here is the call graph for this function:


Member Function Documentation

synchronized void netscape.console.Console.Output.flush ( ) throws IOException [inline]

Definition at line 76 of file Console.java.

                                                               {
              String value = this.buffer.toString();
              console.append(value);
              this.buffer.setLength(0);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized void netscape.console.Console.Output.run ( ) [inline]

When I/O occurs, it is placed in a StringBuffer, which is flushed in a different thread.

This prevents deadlocks that could occur when the AWT itself is printing messages.

Definition at line 86 of file Console.java.

                                      {
                     for (;;) {
                            try {
                            wait();
                            flush();
                     } catch (InterruptedException ie) {
                     } catch (IOException ioe) {
                     }
              }
       }

Here is the call graph for this function:

synchronized void netscape.console.Console.Output.write ( int  b) throws IOException [inline]

Definition at line 66 of file Console.java.

                                                                       {
                     this.buffer.append((char)b);
                     notify();
           }
synchronized void netscape.console.Console.Output.write ( byte[]  buffer,
int  offset,
int  count 
) throws IOException [inline]

Definition at line 71 of file Console.java.

                                                                                                      {
                     this.buffer.append(new String(buffer, 0, offset, count));
                     notify();
              }

Here is the call graph for this function:


Member Data Documentation

StringBuffer netscape.console.Console.Output.buffer = new StringBuffer() [package]

Definition at line 58 of file Console.java.


The documentation for this class was generated from the following file: