SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
ADT:StringBuffer Codec Object RT0
Class List | |
Decoder | |
Encoder | |
UU |
Class Summary: Decoder [Detail] | |
+---Codec.Decoder | +--Codec:UU.Decoder | |
Method Summary | |
Decode(ARRAY OF CHAR, LONGINT, LONGINT, StringBuffer) Decode the 8-bit character sequence in `data[start, end-1]' starting with the decoder state dec. | |
INIT() | |
Reset() Resets the decoder's state to that created by the initial dec.Start. | |
Inherited Methods | |
Class Summary: Encoder [Detail] | |
+---Codec.Encoder | +--Codec:UU.Encoder | |
Method Summary | |
Closure(StringBuffer) If the encoder still holds any partial data from previous calls to enc.Encode, then flush this data to the buffer b. | |
EncodeLatin1(ARRAY OF CHAR, LONGINT, LONGINT, StringBuffer) Encode the Latin1 character sequence in `s[start, end-1]' starting with the encoder state enc. | |
EncodeUTF16(ARRAY OF LONGCHAR, LONGINT, LONGINT, StringBuffer) Encode the UTF-16 character sequence in `s[start, end-1]' starting with the encoder state enc. | |
INIT() | |
Reset() Resets the encoder's state to that created by the initial enc.Start. | |
Inherited Methods | |
From Codec.Encoder: |
Class Summary: UU [Detail] | |
+---RT0.Object | +---Object.Object | +---Codec.Codec | +--Codec:UU.UU | |
Inherited Fields | |
From Codec.Codec: | |
Method Summary | |
NewDecoder(): Decoder Creates a decoder object for the codec c. | |
NewEncoder(): Encoder Creates an encoder object for the codec c. | |
Inherited Methods | |
From RT0.Object: From Object.Object: From Codec.Codec: |
Type Summary | |
Header = RECORD ... END |
Procedure Summary | |
Extract(ARRAY OF CHAR, LONGINT, LONGINT, VAR ARRAY OF CHAR) | |
IsEOL(CHAR): BOOLEAN | |
LineBegin(ARRAY OF CHAR, LONGINT, LONGINT, VAR Header): LONGINT If the text starting a `data[start]' holds a valid `begin' of a uuencoded file, then return the index of the first eol character of the `begin' line. | |
LineData(ARRAY OF CHAR, LONGINT, LONGINT): LONGINT If the text starting a `data[start]' holds a complete text line with uuencoded data, then return the index of the first eol character of the line. | |
LineEnd(ARRAY OF CHAR, LONGINT, LONGINT): LONGINT If the text starting a `data[start]' holds a valid `end' of a uuencode file, then return the index of the first eol character of the `begin' line. | |
Register() |
Variable Summary | |
uu-: UU |
Class Detail: Decoder |
Method Detail |
PROCEDURE (dec: Decoder) Decode(data: ARRAY OF CHAR; start: LONGINT; end: LONGINT; b: StringBuffer)
Decode the 8-bit character sequence in `data[start, end-1]' starting with the decoder state dec. The result is appended to the string buffer b. On completion, dec is updated to reflect the decoder's state after the last byte of the sequence has been processed.
Pre-condition: `0 <= start <= end <= LEN(data)'. dec.Start has been called.
[Description inherited from Decode]
Redefines: Decode
PROCEDURE (dec: Decoder) INIT()
Redefines: INIT
PROCEDURE (dec: Decoder) Reset()
Resets the decoder's state to that created by the initial dec.Start. All allocated resources are kept. Using this method, it is possible to use one and the same decoder for several different data streams.
[Description inherited from Reset]
Redefines: Reset
Class Detail: Encoder |
Method Detail |
PROCEDURE (enc: Encoder) Closure(b: StringBuffer)
If the encoder still holds any partial data from previous calls to enc.Encode, then flush this data to the buffer b. This method must be called at the end of the data stream for codecs that operate on blocks of data, and for which the last and possibly incomplete block must be handled specially.
[Description inherited from Closure]
Redefines: Closure
PROCEDURE (enc: Encoder) EncodeLatin1(s: ARRAY OF CHAR; start: LONGINT; end: LONGINT; b: StringBuffer)
Encode the Latin1 character sequence in `s[start, end-1]' starting with the encoder state enc. The result is a string holding only code points in the range `[U+0000, U+00FF]', which is appended to the string buffer b. On completion, enc is updated to reflect the encoder's state after the last byte of the sequence has been processed.
Pre-condition: `0 <= start <= end <= s.length'. enc.Start has been called. All code points in `data[start, end-1]' are valid. That is, neither is out of range nor from the surrogate areas.
[Description inherited from EncodeLatin1]
Redefines: EncodeLatin1
PROCEDURE (enc: Encoder) EncodeUTF16(s: ARRAY OF LONGCHAR; start: LONGINT; end: LONGINT; b: StringBuffer)
Encode the UTF-16 character sequence in `s[start, end-1]' starting with the encoder state enc. The result is a string holding only code points in the range `[U+0000, U+00FF]', which is appended to the string buffer b. On completion, enc is updated to reflect the encoder's state after the last byte of the sequence has been processed.
Pre-condition: `0 <= start <= end <= s.length'. enc.Start has been called. All code points in `data[start, end-1]' are valid. That is, neither is out of range nor from the surrogate areas.
[Description inherited from EncodeUTF16]
Redefines: EncodeUTF16
PROCEDURE (enc: Encoder) INIT()
Redefines: INIT
PROCEDURE (enc: Encoder) Reset()
Resets the encoder's state to that created by the initial enc.Start. All allocated resources are kept. Using this method, it is possible to use one and the same encoder for several different data streams.
[Description inherited from Reset]
Redefines: Reset
Class Detail: UU |
Method Detail |
PROCEDURE (c: UU) NewDecoder(): Decoder
Creates a decoder object for the codec c. Note: Some decoders, like those implementing an decryption algorithm, require additional settings before they can be used.
[Description inherited from NewDecoder]
Redefines: NewDecoder
PROCEDURE (c: UU) NewEncoder(): Encoder
Creates an encoder object for the codec c. By default, any character sequences the encoder cannot handle cause it to raise an exception EncodingError.
Note: Some encoders, like those implementing encryption algorithm, require additional settings before they can be used.
[Description inherited from NewEncoder]
Redefines: NewEncoder
Type Detail |
TYPE Header = RECORD fileMode-: LONGINT; fileName-: ARRAY n OF CHAR; END
Procedure Detail |
PROCEDURE Extract(source: ARRAY OF CHAR; start: LONGINT; end: LONGINT; VAR destination: ARRAY OF CHAR)
PROCEDURE IsEOL(ch: CHAR): BOOLEAN
PROCEDURE LineBegin(data: ARRAY OF CHAR; start: LONGINT; end: LONGINT; VAR header: Header): LONGINT
If the text starting a `data[start]' holds a valid `begin' of a uuencoded file, then return the index of the first eol character of the `begin' line. In this case, `data[start, result-1]' is the complete line, without the eol character that ends it.
If there is no match, then result `-1'. If the indicated region of data holds no end of line character, then no match is possible.
PROCEDURE LineData(data: ARRAY OF CHAR; start: LONGINT; end: LONGINT): LONGINT
If the text starting a `data[start]' holds a complete text line with uuencoded data, then return the index of the first eol character of the line. In this case, `data[start, result-1]' is the complete line, without the eol character that ends it.
If there is no match, then result `-1'. If the indicated region of data holds no end of line character, then no match is possible.
PROCEDURE LineEnd(data: ARRAY OF CHAR; start: LONGINT; end: LONGINT): LONGINT
If the text starting a `data[start]' holds a valid `end' of a uuencode file, then return the index of the first eol character of the `begin' line. In this case, `data[start, result-1]' is the complete line, without the eol character that ends it.
If there is no match, then result `-1'. If the indicated region of data holds no end of line character, then no match is possible.
PROCEDURE Register()
Variable Detail |
VAR uu-: UU