oracle.stellent.ridc.common.io
Class CloseNotifyInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by oracle.stellent.ridc.common.io.CloseNotifyInputStream
All Implemented Interfaces:
java.io.Closeable

public class CloseNotifyInputStream
extends java.io.FilterInputStream

Inputstream that will only read up to a given content length


Nested Class Summary
static interface CloseNotifyInputStream.CloseMethod
          Allow notifications of the close method
 
Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CloseNotifyInputStream(java.io.InputStream in, CloseNotifyInputStream.CloseMethod closeMethod)
           
 
Method Summary
 void close()
          Closes this input stream and releases any system resources associated with the stream.
 java.io.InputStream getWrappedStream()
           
 
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseNotifyInputStream

public CloseNotifyInputStream(java.io.InputStream in,
                              CloseNotifyInputStream.CloseMethod closeMethod)
Method Detail

getWrappedStream

public java.io.InputStream getWrappedStream()
Returns:
the wrapped input stream

close

public void close()
           throws java.io.IOException
Closes this input stream and releases any system resources associated with the stream. This method simply performs in.close().

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterInputStream
Throws:
java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in


Copyright © 2008-2009 Oracle Corporation. All Rights Reserved.