UnicodeDecoder

better.files.UnicodeDecoder
class UnicodeDecoder(defaultCharset: Charset) extends CharsetDecoder

A Unicode decoder that uses the Unicode byte-order marker (BOM) to auto-detect the encoding (if none detected, falls back on the defaultCharset). This also gets around a bug in the JDK (http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4508058) where BOM is not consumed for UTF-8. See: https://github.com/pathikrit/better-files/issues/107

Attributes

defaultCharset

Use this charset if no known byte-order marker is detected

Graph
Supertypes
class CharsetDecoder
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def decodeLoop(in: ByteBuffer, out: CharBuffer): CoderResult

Attributes

Definition Classes
CharsetDecoder
override def detectedCharset(): Charset

Attributes

Definition Classes
CharsetDecoder
override def implReset(): Unit

Attributes

Definition Classes
CharsetDecoder
override def isAutoDetecting: Boolean

Attributes

Definition Classes
CharsetDecoder
override def isCharsetDetected: Boolean

Attributes

Definition Classes
CharsetDecoder

Inherited methods

final def averageCharsPerByte(): Float

Attributes

Inherited from:
CharsetDecoder
final def charset(): Charset

Attributes

Inherited from:
CharsetDecoder
final def decode(x$0: ByteBuffer): CharBuffer

Attributes

Inherited from:
CharsetDecoder
final def decode(x$0: ByteBuffer, x$1: CharBuffer, x$2: Boolean): CoderResult

Attributes

Inherited from:
CharsetDecoder
final def flush(x$0: CharBuffer): CoderResult

Attributes

Inherited from:
CharsetDecoder
def malformedInputAction(): CodingErrorAction

Attributes

Inherited from:
CharsetDecoder
final def maxCharsPerByte(): Float

Attributes

Inherited from:
CharsetDecoder
final def onMalformedInput(x$0: CodingErrorAction): CharsetDecoder

Attributes

Inherited from:
CharsetDecoder
final def onUnmappableCharacter(x$0: CodingErrorAction): CharsetDecoder

Attributes

Inherited from:
CharsetDecoder
final def replaceWith(x$0: String): CharsetDecoder

Attributes

Inherited from:
CharsetDecoder
final def replacement(): String

Attributes

Inherited from:
CharsetDecoder
final def reset(): CharsetDecoder

Attributes

Inherited from:
CharsetDecoder
def unmappableCharacterAction(): CodingErrorAction

Attributes

Inherited from:
CharsetDecoder