public class CloseShieldReader extends ProxyReader
This class is typically used in cases where a reader needs to be passed to a component that wants to explicitly close the reader even if more input would still be available to other components.
|Constructor and Description|
Using this constructor prevents IDEs from warning if the underlying reader is never closed. Use
|Modifier and Type||Method and Description|
Replaces the underlying reader with a
Creates a proxy that shields the given reader from being closed.
afterRead, beforeRead, handleIOException, mark, markSupported, read, read, read, read, ready, reset, skip
@Deprecated public CloseShieldReader(Reader reader)
reader- underlying reader
public static CloseShieldReader wrap(Reader reader)
reader- the reader to wrap
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.