|
Class: FixedBytesEncoder (in CharacterEncoderImplementations)
Object
|
+--CharacterEncoder
|
+--CharacterEncoderImplementations::FixedBytesEncoder
|
+--CharacterEncoderImplementations::SingleByteEncoder
|
+--CharacterEncoderImplementations::TwoByteEncoder
- Package:
- stx:libbasic
- Category:
- Collections-Text-Encodings
- Version:
- rev:
1.5
date: 2023/10/26 12:37:23
- user: cg
- file: CharacterEncoderImplementations__FixedBytesEncoder.st directory: libbasic
- module: stx stc-classLibrary: libbasic
Common abstract superclass for all encodings which encode to a fixed number of bytes.
copyrightCOPYRIGHT (c) 2004 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here; false for subclasses.
Abstract subclasses must redefine this again.
-
maxCode
-
** This method must be redefined in concrete classes (subclassResponsibility) **
encoding & decoding
-
decode: anEncoding
-
given an integer in my encoding, return a unicode codePoint for it
** This method must be redefined in concrete classes (subclassResponsibility) **
-
decodeString: anEncodedStringOrByteCollection
-
given a string in my encoding, return a unicode-string for it
Usage example(s):
CharacterEncoderImplementations::ISO8859_1 decodeString:'hello'
|
-
encode: aCodePoint
-
given a codePoint in unicode, return a single byte in my encoding for it
** This method must be redefined in concrete classes (subclassResponsibility) **
-
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:$Ą
|
|