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.Resource
s so that they return BufferedInputStream
s.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Default close method is no-op, override if implementation requires.read()
Returns theInputStream
stream of the resource, if exists,null
otherwise.
-
Constructor Details
-
BufferedResource
-
-
Method Details
-
read
Description copied from interface:ResourceHandler.Resource
Returns theInputStream
stream of the resource, if exists,null
otherwise. The stream should be closed by caller, otherwise resource leaks might be introduced.- Specified by:
read
in interfaceResourceHandler.Resource
- Throws:
IOException
-
close
Description copied from interface:ResourceHandler.Resource
Default close method is no-op, override if implementation requires.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceResourceHandler.Resource
- Throws:
IOException
-