Package org.apache.maven.index.reader
Interface ResourceHandler.Resource
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
WritableResourceHandler.WritableResource
- All Known Implementing Classes:
BufferedResource,BufferedWritableResource,PathWritableResource,UrlResource
- Enclosing interface:
ResourceHandler
Handle of content.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Default close method is no-op, override if implementation requires.read()Returns theInputStreamstream of the resource, if exists,nullotherwise.
-
Method Details
-
read
Returns theInputStreamstream of the resource, if exists,nullotherwise. The stream should be closed by caller, otherwise resource leaks might be introduced.- Throws:
IOException
-
close
Default close method is no-op, override if implementation requires.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-