net.sf.mmm.util.io.base
Class NonClosingInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by net.sf.mmm.util.io.base.NonClosingInputStream
All Implemented Interfaces:
Closeable

public class NonClosingInputStream
extends FilterInputStream

This is an NonClosingInputStream.ClosedInputStream that wraps an existing NonClosingInputStream.ClosedInputStream and prevents closing the original NonClosingInputStream.ClosedInputStream.
This can be useful as workaround for bugs like 6539065.

Since:
2.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Nested Class Summary
protected static class NonClosingInputStream.ClosedInputStream
          This inner class is a stream that will always throw a StreamClosedException.
 
Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
NonClosingInputStream(InputStream delegate)
          The constructor.
 
Method Summary
 void close()
          
 
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

NonClosingInputStream

public NonClosingInputStream(InputStream delegate)
The constructor.

Parameters:
delegate - is the NonClosingInputStream.ClosedInputStream to adapt.
Method Detail

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Overrides:
close in class FilterInputStream
Throws:
IOException


Copyright © 2001-2010 mmm-Team. All Rights Reserved.