Back to index

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

List of all members.

Public Member Functions

int read () throws IOException
int read (byte[] b, int offset, int length) throws IOException

Package Attributes

byte[] buffer = new byte[1024]
int position = 0
int count = 0

Private Member Functions

void fillBuffer () throws EOFException

Detailed Description

Definition at line 21 of file Console.java.


Member Function Documentation

void netscape.console.Console.Input.fillBuffer ( ) throws EOFException [inline, private]

Definition at line 26 of file Console.java.

                                                            {
                     // int length = readLine(buffer, 0, buffer.length);
                     int length = 1024;
                     if (length == -1)
                            throw new EOFException();
                     count = length;
                     position = 0;
              }

Here is the caller graph for this function:

int netscape.console.Console.Input.read ( ) throws IOException [inline]

Definition at line 35 of file Console.java.

                                                {
              synchronized(this) {
                     if (position >= count)
                            fillBuffer();
                     return buffer[position++];
              }
           }

Here is the call graph for this function:

int netscape.console.Console.Input.read ( byte[]  b,
int  offset,
int  length 
) throws IOException [inline]

Definition at line 43 of file Console.java.

                                                                                {
                     synchronized(this) {
                            // only fill the buffer at the outset, always returns at most one line of data.
                     if (position >= count)
                            fillBuffer();
                     int initialOffset = offset;
                     while (offset < length && position < count) {
                            b[offset++] = buffer[position++];
                     }
                     return (offset - initialOffset);
                  }
           }

Here is the call graph for this function:


Member Data Documentation

Definition at line 22 of file Console.java.

Definition at line 24 of file Console.java.

Definition at line 23 of file Console.java.


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