Class BufferedResource
java.lang.Object
org.apache.maven.index.reader.resource.BufferedResource
- All Implemented Interfaces:
Closeable,AutoCloseable,ResourceHandler.Resource
- Direct Known Subclasses:
BufferedWritableResource
Wraps
ResourceHandler.Resources so that they return BufferedInputStreams.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Default close method is no-op, override if implementation requires.read()Returns theInputStreamstream of the resource, if exists,nullotherwise.
-
Constructor Details
-
BufferedResource
-
-
Method Details
-
read
Description copied from interface:ResourceHandler.ResourceReturns theInputStreamstream of the resource, if exists,nullotherwise. The stream should be closed by caller, otherwise resource leaks might be introduced.- Specified by:
readin interfaceResourceHandler.Resource- Throws:
IOException
-
close
Description copied from interface:ResourceHandler.ResourceDefault close method is no-op, override if implementation requires.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceResourceHandler.Resource- Throws:
IOException
-