Decode Method
Decode string.
Syntax
netcode.decode([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method decodes according to the Format type. The class will decode the data in the input stream if SetInputStream 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 EncodedFile property. If no valid file has been specified, the class will use the EncodedData 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 DecodedFile. If no file was specified, the decoded data may be retrieved through the DecodedData property.
When UUDecoding the created filename will by default be the one specified in the uuencoded data. The FileName property will contain this value. DecodedFile or, if DecodedFile is empty, FileName can be used to override this value.
When YDecoding, the source path and filename is specified in EncodedFile and the destination path and filename in DecodedFile. If the encoded data indicates the name of the original file before decoding, this value will be stored in the FileName property. To decode a multi-part message, all parts must be concatenated in order in the source file.