- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
AppendableWriter
,EncoderWriter
,FailOnWriteWriter
,NoCloseInputStream
,NoCloseOutputStream
,NoCloseReader
,NoCloseWriter
,NullOutputStream
,NullPrintWriter
,NullWriter
,WriterFacade
,WriterOutputStream
Indicates that
close()
is overridden to be a no-op.
This facilitates avoiding duplicate wrapping for close protection.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Calls to close are ignored whenisNoClose()
, otherwise some action might be taken which means close calls to this object may not be skipped or assumed to be ignored.default boolean
Determines if calls toclose()
will be ignored.
-
Method Details
-
isNoClose
default boolean isNoClose()Determines if calls toclose()
will be ignored. This value must not change over time; it may be queried once, repeatedly, or never. -
close
Calls to close are ignored whenisNoClose()
, otherwise some action might be taken which means close calls to this object may not be skipped or assumed to be ignored.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-