java.lang.Object
java.io.Writer
java.io.FilterWriter
com.aoapps.lang.io.NoCloseWriter
- All Implemented Interfaces:
NoClose
,Closeable
,Flushable
,Appendable
,AutoCloseable
Overrides
close()
to a no-op.-
Field Summary
Fields inherited from class java.io.FilterWriter
out
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Does not close the wrapped writer.Returnsout
when it is already aNoClose
andNoClose.isNoClose()
, otherwise returns a newNoCloseWriter
wrappingout
.Methods inherited from class java.io.FilterWriter
flush, write, write, write
-
Constructor Details
-
NoCloseWriter
Deprecated.Please usewrap(java.io.Writer)
to skip wrapping when possible.
-
-
Method Details
-
wrap
Returnsout
when it is already aNoClose
andNoClose.isNoClose()
, otherwise returns a newNoCloseWriter
wrappingout
. -
close
public void close()Does not close the wrapped writer.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceNoClose
- Overrides:
close
in classFilterWriter
-
wrap(java.io.Writer)
to skip wrapping when possible.