org.apache.felix.deploymentadmin
Class NonCloseableStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.apache.felix.deploymentadmin.NonCloseableStream
All Implemented Interfaces:
Closeable

public class NonCloseableStream
extends InputStream

Stream that does nothing when close() is invoked, calls to one of the read methods will throw an IOException after close() is called. Also, mark/reset is not supported. Deployment Admin can use this class to pass on as an InputStream to a resource processor.


Constructor Summary
NonCloseableStream(InputStream m_input)
           
 
Method Summary
 int available()
           
 void close()
           
 boolean equals(Object obj)
           
 int hashCode()
           
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonCloseableStream

public NonCloseableStream(InputStream m_input)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

mark

public void mark(int readlimit)
Overrides:
mark in class InputStream

reset

public void reset()
           throws IOException
Overrides:
reset in class InputStream
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.