diff options
author | Paul Phillips <paulp@improving.org> | 2009-07-03 01:32:25 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-07-03 01:32:25 +0000 |
commit | 865ec030f30c4748af6b0bd8f116a79f98074e6a (patch) | |
tree | 86180a96901b9b1756760c7cddb4fea039161b63 | |
parent | 76228e8448e7ccec9beb9e26a977d0eb141d7c35 (diff) | |
download | scala-865ec030f30c4748af6b0bd8f116a79f98074e6a.tar.gz scala-865ec030f30c4748af6b0bd8f116a79f98074e6a.tar.bz2 scala-865ec030f30c4748af6b0bd8f116a79f98074e6a.zip |
Added the co- part of codec.
-rw-r--r-- | src/library/scala/io/Codec.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library/scala/io/Codec.scala b/src/library/scala/io/Codec.scala index b2d8eeaf3b..a4b124823d 100644 --- a/src/library/scala/io/Codec.scala +++ b/src/library/scala/io/Codec.scala @@ -26,9 +26,10 @@ import java.nio.charset.{ Charset, CharsetDecoder, CodingErrorAction } /** A class for character encoding/decoding preferences. * */ -class Codec(charSet: Charset) { +class Codec(val charSet: Charset) { def name = charSet.name def decoder = charSet.newDecoder() + def encoder = charSet.newEncoder() // by default we ignore bad characters. // this behavior can be altered by overriding these two methods |