Oracle

com.compoze.util
Class UninterruptedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by com.compoze.util.UninterruptedInputStream
All Implemented Interfaces:
java.io.Closeable

public class UninterruptedInputStream
extends java.io.FilterInputStream

This class is a filtered InputStream that ignores InterruptedIOExceptions. This is useful in Solaris implementations of the VM which actually implement them, but when you still want to ignore them. You must be sure that underlying InputStreams may be restarted. GzipInputStream is an example of one InputStream that cannot be restarted.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
UninterruptedInputStream(java.io.InputStream is)
          Constructor.
 
Method Summary
 int read()
          Reads a byte.
 int read(byte[] abyte0)
          Reads bytes.
 int read(byte[] abyte0, int i, int j)
          Reads bytes.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UninterruptedInputStream

public UninterruptedInputStream(java.io.InputStream is)
Constructor.

Method Detail

read

public int read()
         throws java.io.IOException
Reads a byte.

Overrides:
read in class java.io.FilterInputStream
Returns:
the byte that was read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - if an i/o error occurred

read

public int read(byte[] abyte0,
                int i,
                int j)
         throws java.io.IOException
Reads bytes.

Overrides:
read in class java.io.FilterInputStream
Parameters:
abyte0 - the buffer to read into
i - the offset into the array
j - the length to read
Returns:
the number of bytes that were read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - if an i/o error occurred

read

public int read(byte[] abyte0)
         throws java.io.IOException
Reads bytes.

Overrides:
read in class java.io.FilterInputStream
Parameters:
abyte0 - the buffer to read into
Returns:
the number of bytes that were read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - if an i/o error occurred

Oracle

Copyright ©1999-2008 Oracle All rights reserved.