Class

org.apache.daffodil.processors.charset

NBitsWidth_BitsCharset

Related Doc: package charset

Permalink

class NBitsWidth_BitsCharset extends BitsCharset

Some encodings are not byte-oriented.

If we know the correspondence from integers to characters, and we can express that as a string, then everything else can be derived

This class is explicitly not a java.nio.charset.Charset. It is a BitsCharset, which is not a compatible type with a java.nio.charset.Charset on purpose so we don't confuse the two.

The problem is that java.nio.charset.Charset is designed in such a way that one cannot implement a proxy class that redirects methods to another class. This is due to all the final methods on the class.

So instead we do the opposite. We implement our own BitsCharset API, but implement the behavior in terms of a proxy JavaCharsetDecoder and proxy JavaCharsetEncoder that drive the decodeLoop and encodeLoop. This way we don't have to re-implement all the error handling and flush/end logic.

Linear Supertypes
BitsCharset, Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NBitsWidth_BitsCharset
  2. BitsCharset
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NBitsWidth_BitsCharset(name: String, decodeString: String, bitWidthOfACodeUnit: Int, requiredBitOrder: BitOrder, replacementCharCode: Int)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def averageBitsPerChar(): Float

    Permalink
  6. def averageBytesPerChar(): Float

    Permalink
  7. def averageCharsPerBit(): Float

    Permalink
  8. def averageCharsPerByte(): Float

    Permalink
  9. val bitWidthOfACodeUnit: Int

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  10. def charToCode(char: Char): MaybeInt

    Permalink
  11. def checks(): Unit

    Permalink
    Attributes
    protected
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def codeToChar(code: Int): Char

    Permalink
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def equals(other: Any): Boolean

    Permalink
    Definition Classes
    BitsCharset → AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def hashCode(): Int

    Permalink
    Definition Classes
    BitsCharset → AnyRef → Any
  19. final lazy val init: Unit

    Permalink
    Attributes
    protected
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def mandatoryBitAlignment: Int

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  22. def maxBitsPerChar(): Float

    Permalink
  23. def maxBytesPerChar(): Float

    Permalink
  24. def maxCharsPerBit(): Float

    Permalink
  25. def maxCharsPerByte(): Float

    Permalink
  26. def maybeFixedWidth: MaybeInt

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  27. val name: String

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def newDecoder(): BitsCharsetDecoder

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  30. def newEncoder(): BitsCharsetEncoder

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def padCharWidthInBits: Int

    Permalink
    Definition Classes
    BitsCharset
  34. val replacementCharCode: Int

    Permalink
  35. val requiredBitOrder: BitOrder

    Permalink
    Definition Classes
    NBitsWidth_BitsCharsetBitsCharset
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BitsCharset

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped