From d847278347e4c52b815920fe0e469927c3bbaaa9 Mon Sep 17 00:00:00 2001 From: Michael Schmitz Date: Mon, 9 Jan 2012 11:15:51 -0800 Subject: Added toString to Codec class (uses Codec.name). --- src/library/scala/io/Codec.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/library') diff --git a/src/library/scala/io/Codec.scala b/src/library/scala/io/Codec.scala index 1a27df1c10..d9cef0edb1 100644 --- a/src/library/scala/io/Codec.scala +++ b/src/library/scala/io/Codec.scala @@ -38,6 +38,9 @@ class Codec(val charSet: Charset) { private[this] var _decodingReplacement: String = null private[this] var _onCodingException: Handler = e => throw e + /** The name of the Codec. */ + override def toString = name + // these methods can be chained to configure the variables above def onMalformedInput(newAction: Action): this.type = { _onMalformedInput = newAction ; this } def onUnmappableCharacter(newAction: Action): this.type = { _onUnmappableCharacter = newAction ; this } -- cgit v1.2.3