A Ceylon Destroyable that adapts an instance of Java's AutoCloseable, allowing it to be used as a resource in the try construct.

try (inputStream = CeylonDestroyable(FileInputStream(file)) {
    Integer byte = inputStream.resource.read();
    ...
}

Note: Since Ceylon 1.2.1 it is possible to use AutoCloseable directly in a Ceylon try statement:

try (inputStream = FileInputStream(file)) {
    ...
}

no subtypes hierarchy

Initializer
CeylonDestroyable(Resource resource)
Attributes
resourceSource Codeshared Resource resource
Inherited Attributes
Attributes inherited from: Object
Methods
destroySource Codeshared actual void destroy(Throwable? exception)

Destroy this resource. Called when execution of the body of the try statement ends, even if an exception propagates out of the body of the try.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Destroyable