public interface Disposable extends AutoCloseable
We'd just use AutoCloseable
directly except that it annoyingly declares close
to throw an arbitrary exception which makes life annoying for callers. Because we extend
auto-closeable a disposable can be used anywhere an auto-closeable can, we're just less
burdensome.
Modifier and Type | Method and Description |
---|---|
void |
close()
Disposes this resource.
|
void close()
close
in interface AutoCloseable
Copyright © 2015. All Rights Reserved.