eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CharacterEncoderImplementations::FixedBytesEncoder':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: FixedBytesEncoder (in CharacterEncoderImplementations)


Inheritance:

   Object
   |
   +--CharacterEncoder
      |
      +--CharacterEncoderImplementations::FixedBytesEncoder
         |
         +--CharacterEncoderImplementations::SingleByteEncoder
         |
         +--CharacterEncoderImplementations::TwoByteEncoder

Package:
stx:libbasic
Category:
Collections-Text-Encodings
Version:
rev: 1.1 date: 2018/01/19 10:06:11
user: stefan
file: CharacterEncoderImplementations__FixedBytesEncoder.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Stefan Vogel

Description:


Common abstract superclass for all encodings which encode to a fixed number of bytes.


Class protocol:

queries
o  isAbstract
Return if this class is an abstract class.
True is returned here; false for subclasses.
Abstract subclasses must redefine this again.

o  maxCode

** This method raises an error - it must be redefined in concrete classes **

o  minCode


Instance protocol:

encoding & decoding
o  decode: anEncoding
given an integer in my encoding, return a unicode codePoint for it

** This method raises an error - it must be redefined in concrete classes **

o  decodeString: anEncodedStringOrByteCollection
given a string in my encoding, return a unicode-string for it
usage example(s):
     CharacterEncoderImplementations::ISO8859_1 decodeString:'hello'

o  encode: aCodePoint
given a codePoint in unicode, return a single byte in my encoding for it

** This method raises an error - it must be redefined in concrete classes **

o  encodeCharacter: aUnicodeCharacterOrCodePoint
encode aUnicodeCharacterOrCodePoint to a (8-bit) String or ByteArray
usage example(s):
      CharacterEncoderImplementations::ISO8859_10 new encodeCharacter:260
      CharacterEncoderImplementations::ISO8859_10 new encodeCharacter:$Ą



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 16 Jul 2018 14:33:15 GMT