java.lang.Object
java.io.Reader
java.io.FilterReader
com.aoapps.lang.io.NoCloseReader
- All Implemented Interfaces:
NoClose,Closeable,AutoCloseable,Readable
Overrides
close() to a no-op.-
Field Summary
Fields inherited from class java.io.FilterReader
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Does not close the wrapped reader.Returnsinwhen it is already aNoCloseandNoClose.isNoClose(), otherwise returns a newNoCloseReaderwrappingin.Methods inherited from class java.io.FilterReader
mark, markSupported, read, read, ready, reset, skipMethods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
NoCloseReader
Deprecated.Please usewrap(java.io.Reader)to skip wrapping when possible.
-
-
Method Details
-
wrap
Returnsinwhen it is already aNoCloseandNoClose.isNoClose(), otherwise returns a newNoCloseReaderwrappingin. -
close
public void close()Does not close the wrapped reader.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceNoClose- Overrides:
closein classFilterReader
-

wrap(java.io.Reader)to skip wrapping when possible.