com.compoze.util
Class UninterruptedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
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.
Fields inherited from class java.io.FilterInputStream |
in |
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 |
UninterruptedInputStream
public UninterruptedInputStream(java.io.InputStream is)
- Constructor.
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 intoi
- the offset into the arrayj
- 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
Copyright ©1999-2008 Oracle All rights reserved.