IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

Encode Method

Encode the data.

Syntax

netcode.encode([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 encodes the data according to the Format type. The class will encode 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 DecodedFile property. If no valid file has been specified, the class will use the DecodedData property.

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

The data is considered binary while uuencoding and Base64 Formats, and Text during QuotedPrintable ones.

When uuencoding or yencoding the filename encoded into the data is taken from the FileName property.

The current version of NetCode creates no message headers. If a MIME standard encoding is used such as Base64 Encoding or Quoted Printable Encoding the user should fill the header values appropriately.

If EncodedFile and MaxFileSize is set and the encoded data takes more space than MaxFileSize, the data is split over several files. In this case, the user can specify more than one filename by passing them to EncodedFile in the form name?. The filenames should exist as path\file0.ext, path\file1.ext ... Question marks "?" are expanded to numerals starting with 0. NetCode appends the extension ".uue", ".b16", or ".q_p" (depending on the value of Format) to the filename.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0