public class CloseShieldWriter extends ProxyWriter
This class is typically used in cases where a writer needs to be passed to a component that wants to explicitly close the writer even if other components would still use the writer for output.
|Constructor and Description|
Using this constructor prevents IDEs from warning if the underlying writer is never closed. Use
|Modifier and Type||Method and Description|
Replaces the underlying writer with a
Creates a proxy that shields the given writer from being closed.
afterWrite, append, append, append, beforeWrite, flush, handleIOException, write, write, write, write, write
@Deprecated public CloseShieldWriter(Writer writer)
writer- underlying writer
public static CloseShieldWriter wrap(Writer writer)
writer- the writer to wrap
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.