站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

NullInputStream (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.stream
Class NullInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.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.


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