Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Package Attributes
netscape.oji.MRJConsole.Output Class Reference
Inheritance diagram for netscape.oji.MRJConsole.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.
 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 145 of file MRJConsole.java.


Constructor & Destructor Documentation

Definition at line 148 of file MRJConsole.java.

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

Here is the call graph for this function:

Definition at line 149 of file MRJConsole.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.oji.MRJConsole.Output.flush ( ) throws IOException [inline]

Definition at line 164 of file MRJConsole.java.

                                                               {
              String value = this.buffer.toString();
              window.text.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.oji.MRJConsole.Output.flush ( ) throws IOException [inline]

Definition at line 165 of file MRJConsole.java.

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

Here is the call graph for this function:

synchronized void netscape.oji.MRJConsole.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 174 of file MRJConsole.java.

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

Here is the call graph for this function:

synchronized void netscape.oji.MRJConsole.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 175 of file MRJConsole.java.

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

Here is the call graph for this function:

synchronized void netscape.oji.MRJConsole.Output.write ( int  b) throws IOException [inline]

Definition at line 154 of file MRJConsole.java.

                                                                       {
                     this.buffer.append((char)b);
                     notify();
           }
synchronized void netscape.oji.MRJConsole.Output.write ( int  b) throws IOException [inline]

Definition at line 155 of file MRJConsole.java.

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

Definition at line 159 of file MRJConsole.java.

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

Here is the call graph for this function:

synchronized void netscape.oji.MRJConsole.Output.write ( byte[]  buffer,
int  offset,
int  count 
) throws IOException [inline]

Definition at line 160 of file MRJConsole.java.

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

Here is the call graph for this function:


Member Data Documentation

StringBuffer netscape.oji.MRJConsole.Output.buffer = new StringBuffer() [package]

Definition at line 146 of file MRJConsole.java.


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