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 void
close()
Default close method is no-op, override if implementation requires.read()
Returns theInputStream
stream of the resource, if exists,null
otherwise.
-
Method Details
-
read
Returns theInputStream
stream of the resource, if exists,null
otherwise. 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-