Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.util.stream
Class NullInputStream

    java.lang.Object
      java.io.InputStream
          org.jboss.util.stream.NullInputStream

public final class NullInputStream
extends InputStream

A `null` `InputStream`. Methods that return values, return values that indicate that there is no more data to be read, other methods are non-operations.

Version:
  `$Revision: 1.1 $`
Author:
  Jason Dillon

Field Summary
`static NullInputStream` | `INSTANCE` A default null input stream.

Constructor Summary
`NullInputStream()`

Method Summary
`int` | `available()` Always returns zero.
`void` | `close()` Non-operation.
`void` | `mark(int readLimit)` Non-operation.
`boolean` | `markSupported()` Always returns false.
`int` | `read()` Always returns -1.
`int` | `read(byte[] bytes)` Always returns -1.
`int` | `read(byte[] bytes, int offset, int length)` Always returns -1.
`void` | `reset()` Non-operation.
`long` | `skip(long n)` Always returns zero.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INSTANCE

    public static final NullInputStream INSTANCE

  A default null input stream.

Constructor Detail

### NullInputStream

    public NullInputStream()

Method Detail

### available

    public int available()

  Always returns zero.

  Returns:
    Zero.

### mark

    public void mark(int readLimit)

  Non-operation.

### markSupported

    public boolean markSupported()

  Always returns false.

  Returns:
    False.

### reset

    public void reset()

  Non-operation.

### close

    public void close()

  Non-operation.

### read

    public int read()

  Always returns -1.

  Returns:
    -1.

### read

    public int read(byte[] bytes,
                    int offset,
                    int length)

  Always returns -1.

  Returns:
    -1.

### read

    public int read(byte[] bytes)

  Always returns -1.

  Returns:
    -1.

### skip

    public long skip(long n)

  Always returns zero.

  Returns:
    Zero.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.