JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.console
Class NullInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--com.apple.mrj.console.NullInputStream

Deprecated. As of MacOSX 10.2

public class NullInputStream
extends InputStream

The NullInputStream class is used as a convenient and neverending source of end-of-file returns. It is convenient as a source of standard input, when no interation is desired.

Since:
MRJ-Simba
See Also:
System.in, InputStream

Constructor Summary
NullInputStream()
          Deprecated.  
 
Method Summary
 int read()
          Deprecated. Supplies an end-of-stream return code immediately, without supplying any data.
 int read(byte[] b, int off, int len)
          Deprecated. Supplies an end-of-stream return code immediately, without supplying any data.
 long skip(long n)
          Deprecated. Supplies an end-of-stream return code immediately, since there is no data to skip.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullInputStream

public NullInputStream()
Deprecated. 
Method Detail

read

public int read()
         throws IOException
Deprecated. 
Supplies an end-of-stream return code immediately, without supplying any data.
Overrides:
read in class InputStream
Returns:
-1, to indicate that we have reached the end of the "stream".
Throws:
IOException - in the (highly unlikely) event that an I/O error occurs...
See Also:
InputStream.read()

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Deprecated. 
Supplies an end-of-stream return code immediately, without supplying any data.
Overrides:
read in class InputStream
Parameters:
b - the buffer that would be filled with data, had we any to provide.
off - the offset into the start of the buffer.
len - the length of the buffer.
Returns:
-1, to indicate that we have reached the end of the "stream".
Throws:
IOException - in the (highly unlikely) event that an I/O error occurs...
See Also:
InputStream.read(byte[], int, int)

skip

public long skip(long n)
          throws IOException
Deprecated. 
Supplies an end-of-stream return code immediately, since there is no data to skip.
Overrides:
skip in class InputStream
Parameters:
n - the number of bytes to skip (ignored).
Returns:
-1, to indicate that we have reached the end of the "stream".
Throws:
IOException - in the (highly unlikely) event that an I/O error occurs...
See Also:
InputStream.skip(long)

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.