Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Package Attributes | Private Member Functions
netscape.oji.MRJConsole.Input Class Reference
Collaboration diagram for netscape.oji.MRJConsole.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
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
void fillBuffer () throws EOFException

Detailed Description

Definition at line 109 of file MRJConsole.java.


Member Function Documentation

void netscape.oji.MRJConsole.Input.fillBuffer ( ) throws EOFException [inline, private]

Definition at line 114 of file MRJConsole.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:

void netscape.oji.MRJConsole.Input.fillBuffer ( ) throws EOFException [inline, private]

Definition at line 115 of file MRJConsole.java.

                                                            {
                     // int length = readLine(buffer, 0, buffer.length);
                     int length = 1024;
                     if (length == -1)
                            throw new EOFException();
                     count = length;
                     position = 0;
              }
int netscape.oji.MRJConsole.Input.read ( ) throws IOException [inline]

Definition at line 123 of file MRJConsole.java.

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

Here is the call graph for this function:

int netscape.oji.MRJConsole.Input.read ( ) throws IOException [inline]

Definition at line 124 of file MRJConsole.java.

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

Here is the call graph for this function:

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

Definition at line 131 of file MRJConsole.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:

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

Definition at line 132 of file MRJConsole.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 110 of file MRJConsole.java.

Definition at line 112 of file MRJConsole.java.

Definition at line 111 of file MRJConsole.java.


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