Class CloseShieldInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.PushbackInputStream
-
- com.github.toolarium.sanitize.content.impl.bleach.util.CloseShieldInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class CloseShieldInputStream extends java.io.PushbackInputStreamProxy stream that prevents the underlying input stream from being closed.This class is typically used in cases where an input stream needs to be passed to a component that wants to explicitly close the stream even if more input would still be available to other components. JavaDoc copied from the Apache Commons-IO project, with code changed to match our dependencies. file: org.apache.commons.io.input.CloseShieldInputStream.java
-
-
Constructor Summary
Constructors Constructor Description CloseShieldInputStream(java.io.InputStream inStream)Constructor for CloseShieldInputStream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidrealClose()Real close-
Methods inherited from class java.io.PushbackInputStream
available, mark, markSupported, read, read, reset, skip, unread, unread, unread
-
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.PushbackInputStream- Throws:
java.io.IOException- See Also:
FilterInputStream.close()
-
realClose
public void realClose() throws java.io.IOExceptionReal close- Throws:
java.io.IOException- In case of an I/O error
-
-