scalax.io

class CloseableResource

[source: scalax/io/CloseableResource.scala]

abstract class CloseableResource[+C <: java.io.Closeable]
extends ManagedResource[C]
Direct Known Subclasses:
InputStreamResource, ReaderResource, OutputStreamResource, WriterResource

Type Summary
abstract type Handle <: C
Method Summary
final def translate (v : Handle) : Handle
Should be implemented to translate a Handle into the desired resource type.
override def unsafeClose (r : Handle) : Unit
Should be implemented to dispose of the managed resource. This will be called automatically when the ManagedResource is used in a for-comprehension.
Methods inherited from ManagedResource
unsafeOpen (abstract), unsafeCloseQuietly, unsafeCloseIgnoringException, foreach, flatMap, map, acquireFor, and
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Class Summary
protected trait Wrapper extends AnyRef
Type Details
abstract type Handle <: C

Method Details
final def translate(v : Handle) : Handle
Should be implemented to translate a Handle into the desired resource type.
Overrides
ManagedResource.translate

override def unsafeClose(r : Handle) : Unit
Should be implemented to dispose of the managed resource. This will be called automatically when the ManagedResource is used in a for-comprehension.
Overrides
ManagedResource.unsafeClose


Copyright (c) 2005-8 The Scalax Project. All Rights Reserved.