BCoder

class BCoder(val charset: Charset) extends Encoder[String, String] with Decoder[String, String]

Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a> and allows a character set to be specified.

<a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message handling software.

See also

<a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text</a>

Since

3.2.0

Companion
object
trait Decoder[String, String]
trait Encoder[String, String]
class Object
trait Matchable
class Any

Value members

Concrete methods

def decode(text: String): String

Decodes a Base64 string into its original form. Escaped characters are converted back to their original representation.

Decodes a Base64 string into its original form. Escaped characters are converted back to their original representation.

Value Params
text

Base64 string to convert into its original form

Returns

original string

def encode(value: String): String

Encodes a string into its Base64 form using the default charset. Unsafe characters are escaped.

Encodes a string into its Base64 form using the default charset. Unsafe characters are escaped.

Value Params
value

string to convert to Base64 form

Returns

Base64 string

Concrete fields

val charset: Charset