diff options
author | Michael Schmitz <michael@schmitztech.com> | 2012-01-09 11:15:51 -0800 |
---|---|---|
committer | Michael Schmitz <michael@schmitztech.com> | 2012-01-09 11:15:51 -0800 |
commit | d847278347e4c52b815920fe0e469927c3bbaaa9 (patch) | |
tree | 1cffd4e4db3efa2c60bc1485a865131dbe1a7a0d /src/library | |
parent | 820491ed6376e9f8f8a8102387495113dce55444 (diff) | |
download | scala-d847278347e4c52b815920fe0e469927c3bbaaa9.tar.gz scala-d847278347e4c52b815920fe0e469927c3bbaaa9.tar.bz2 scala-d847278347e4c52b815920fe0e469927c3bbaaa9.zip |
Added toString to Codec class (uses Codec.name).
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/io/Codec.scala | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |