ca.sqlpower.architect
Class UnclosableInputStream
java.lang.Object
java.io.InputStream
ca.sqlpower.architect.UnclosableInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class UnclosableInputStream
- extends java.io.InputStream
Wrapper class around InputStream to prevent it from closing.
A separate method forceClose() can be called to close
the input stream explicitly.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
UnclosableInputStream
public UnclosableInputStream(java.io.InputStream in)
available
public int available()
throws java.io.IOException
- Overrides:
available in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException
forceClose
public void forceClose()
throws java.io.IOException
- Forces the InputStream to close. Using this method, we can close
the InputStream when we want rather than parse methods doing it
for us.
- Throws:
java.io.IOException
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
mark
public void mark(int readlimit)
- Overrides:
mark in class java.io.InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class java.io.InputStream
read
public int read()
throws java.io.IOException
- Specified by:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
reset
public void reset()
throws java.io.IOException
- Overrides:
reset in class java.io.InputStream
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Overrides:
skip in class java.io.InputStream
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca