Interface CloseableResource

All Superinterfaces:
AbstractResource, AutoCloseable, Closeable, ReadableResource, Resource, WritableResource
All Known Implementing Classes:
TestResource

public interface CloseableResource extends Closeable, Resource
Closeable Resource.

For Resource implementations which are Closeable and thus have (!) to be Closeable.close() after use.

Note that the majority of Resource implementations (such as e.g. the FileResource) themselves are NOT Closeable, because their ByteSource and ByteSink are designed in (generally) resource leak safe way.

There are however some more special case Resource implementations which do require to be closed to avoid resource leaks.