UueArchive.UueArchive

UueArchive()

Initializes a new instance of the UueArchive class prepared for encoding.

public UueArchive()

Examples

The following example shows how to uuencode file.

using (var archive = new UueArchive()) 
{
    archive.SetSource("data.bin");
    archive.Save("archive.uue");
}

See Also


UueArchive(Stream)

Initializes a new instance of the UueArchive class prepared for decoding.

public UueArchive(Stream sourceStream)
ParameterTypeDescription
sourceStreamStreamThe source of the archive.

Remarks

This constructor does not decode. See Open method for decompressing.

Examples

Open an archive from a stream and extract it to a MemoryStream

var ms = new MemoryStream();
using (var archive = new UueArchive(File.OpenRead("archive.001")))
  archive.Open().CopyTo(ms);

See Also


UueArchive(string)

Initializes a new instance of the UueArchive class.

public UueArchive(string path)
ParameterTypeDescription
pathStringThe path to the archive file.

Exceptions

exceptioncondition
ArgumentNullExceptionpath is null.
SecurityExceptionThe caller does not have the required permission to access.
ArgumentExceptionThe path is empty, contains only white spaces, or contains invalid characters.
UnauthorizedAccessExceptionAccess to file path is denied.
PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
NotSupportedExceptionFile at path contains a colon (:) in the middle of the string.
DirectoryNotFoundExceptionThe specified path is invalid, such as being on an unmapped drive.
FileNotFoundExceptionThe file is not found.
IOExceptionThe file is already open.

Remarks

This constructor does not decompress. See Open method for decompressing.

Examples

Open an archive from file by path and decode it to a MemoryStream

var ms = new MemoryStream();
using (var archive = new UueArchive("archive.uue"))
  archive.Open().CopyTo(ms);

See Also