decode Method

Decode string.

Syntax

def decode() -> None: ...

Remarks

This method decodes according to the format type. The class will decode the data in the input stream if set_input_stream has been set to a valid stream. If this stream is null, the class will then try to read the data from the file set by the encoded_file property. If no valid file has been specified, the class will use the encoded_data property.

The resulting decoded data is written to the output stream if one has been set. If not, the component will attempt to write the decoded data to the decoded_file. If no file was specified, the decoded data may be retrieved through the decoded_data property.

When UUDecoding the created filename will by default be the one specified in the uuencoded data. The file_name property will contain this value. decoded_file or, if decoded_file is empty, file_name can be used to override this value.

When YDecoding, the source path and filename is specified in encoded_file and the destination path and filename in decoded_file. If the encoded data indicates the name of the original file before decoding, this value will be stored in the file_name property. To decode a multi-part message, all parts must be concatenated in order in the source file.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Python Edition - Version 20.0 [Build 8307]