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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Does not close the wrapped reader.Returnsin
when it is already aNoClose
andNoClose.isNoClose()
, otherwise returns a newNoCloseReader
wrappingin
.Methods inherited from class java.io.FilterReader
mark, markSupported, read, read, ready, reset, skip
Methods 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
Returnsin
when it is already aNoClose
andNoClose.isNoClose()
, otherwise returns a newNoCloseReader
wrappingin
. -
close
public void close()Does not close the wrapped reader.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceNoClose
- Overrides:
close
in classFilterReader
-
wrap(java.io.Reader)
to skip wrapping when possible.