edu.emory.mathcs.util.io
Class ThreadSafeBufferedInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.io.BufferedInputStream
              extended byedu.emory.mathcs.util.io.ThreadSafeBufferedInputStream

public class ThreadSafeBufferedInputStream
extends java.io.BufferedInputStream

Buffered input stream that behaves correctly under asynchronous close.

Author:
Dawid Kurzyniec

Field Summary
 
Fields inherited from class java.io.BufferedInputStream
buf, count, marklimit, markpos, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ThreadSafeBufferedInputStream(java.io.InputStream in)
           
 
Method Summary
 void close()
           
 int read(byte[] buf, int off, int len)
           
 
Methods inherited from class java.io.BufferedInputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadSafeBufferedInputStream

public ThreadSafeBufferedInputStream(java.io.InputStream in)
Method Detail

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException