Charset

abstract class Charset : Comparable<Charset>

A minimal multiplatform dummy port of java.nio.charset.Charset. This implementation supports only UTF-8.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun compareTo(other: Charset): Int

Compares this charset to another by comparing their canonical names (ignoring case).

Link copied to clipboard
abstract fun contains(cs: Charset): Boolean

Tells whether or not this charset contains the given charset. Since only UTF-8 is supported, it returns true if and only if cs is this.

Link copied to clipboard

Convenience method that decodes bytes in this charset into Unicode characters.

Link copied to clipboard

Convenience method that encodes Unicode characters into bytes in this charset.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun name(): String

Returns this charset's canonical name.

Link copied to clipboard
abstract fun newDecoder(): CharsetDecoder

Constructs a new decoder for this charset.

Link copied to clipboard
abstract fun newEncoder(): CharsetEncoder

Constructs a new encoder for this charset.]

Link copied to clipboard
open override fun toString(): String