-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AppendableWriter,EncoderWriter,FailOnWriteWriter,NoCloseInputStream,NoCloseOutputStream,NoCloseReader,NoCloseWriter,NullOutputStream,NullPrintWriter,NullWriter,WriterFacade,WriterOutputStream
public interface NoClose extends Closeable
Indicates thatclose()is overridden to be a no-op. This facilitates avoiding duplicate wrapping for close protection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()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 booleanisNoClose()Determines if calls toclose()will be ignored.
-
-
-
Method Detail
-
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
void close() throws IOExceptionCalls 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-