Hunny Software Library Reference

BinHex Class

Class for converting files to or from BinHex format.

For a list of all members of this type, see BinHex Members.

System.Object
   BinHex

[Visual Basic]
Public Class BinHex
[C#]
public class BinHex

Remarks

BinHex converts data to or from BinHex format. BinHex is a format used almost exclusively on Macintosh computers for encoding files into text characters for transmission through the mail transport system or for archiving on non-Macintosh systems. The format includes the file name, file type, file creator, Macintosh Finder flags, data fork, resource fork, and checksums. In MIME, the use of BinHex is deprecated; applesingle and appledouble are the preferred format for encoding Macintosh files. The BinHex format is described in RFC 1741. BinHex is a widely used, de facto standard, but it is not an official Internet standard.

To use BinHex for converting a Macintosh file to BinHex format, set the FileName, FileType, FileCreator, Flag1, Flag2, DataFork, and ResourceFork properties to the elements to be encoded. (The library sets reasonable default values for any elements that you do not set.) Then call the Encode() method to actually perform the conversion to BinHex. Finally, get the BinHexChars property to get the characters of the BinHex file.

To use BinHex for converting a Macintosh file from BinHex format, set the BinHexChars property to the characters of the BinHex file to be converted. Then call Decode() to actually perform the conversion. Finally, get the FileName, FileType, FileCreator, Flag1, Flag2, DataFork, and ResourceFork properties to get the decoded elements.

Note: BinHex does not change the file name in any way. When you deal with file names, you should be aware of the fact that some filenames that are valid on a Macintosh may cause problems or unexpected results on a non-Macintosh system, and vice versa. Such problem characters include slash ('/'), colon (':'), space and possibly other characters.

Requirements

Namespace: Hunny.Mime

Assembly: Hunny.Mime (in Hunny.Mime.dll)

See Also

BinHex Members | Hunny.Mime Namespace | RFC 1741: MIME Content Type for BinHex Encoded Files