C# Class MimeKit.Encodings.UUDecoder

Incrementally decodes content encoded with the Unix-to-Unix encoding.

The UUEncoding is an encoding that predates MIME and was used to encode binary content such as images and other types of multi-media to ensure that the data remained intact when sent via 7bit transports such as SMTP.

These days, the UUEncoding has largely been deprecated in favour of the base64 encoding, however, some older mail clients still use it.

Inheritance: IMimeDecoder
ファイルを表示 Open project: nachocove/MimeKit Class Usage Examples

Public Methods

Method Description
Clone ( ) : IMimeDecoder

Clone the UUDecoder with its current state.

Creates a new UUDecoder with exactly the same state as the current decoder.

Decode ( byte input, int length, byte output ) : int

Decodes the specified input into the output buffer.

Decodes the specified input into the output buffer.

The output buffer should be large enough to hold all of the decoded input. For estimating the size needed for the output buffer, see EstimateOutputLength.

Decode ( byte input, int startIndex, int length, byte output ) : int

Decodes the specified input into the output buffer.

Decodes the specified input into the output buffer.

The output buffer should be large enough to hold all of the decoded input. For estimating the size needed for the output buffer, see EstimateOutputLength.

EstimateOutputLength ( int inputLength ) : int

Estimates the length of the output.

Estimates the number of bytes needed to decode the specified number of input bytes.

Reset ( ) : void

Resets the decoder.

Resets the state of the decoder.

UUDecoder ( ) : System

Initializes a new instance of the MimeKit.Encodings.UUDecoder class.

Creates a new Unix-to-Unix decoder.

UUDecoder ( bool payloadOnly ) : System

Initializes a new instance of the MimeKit.Encodings.UUDecoder class.

Creates a new Unix-to-Unix decoder.

Private Methods

Method Description
ScanBeginMarker ( byte inptr, byte inend ) : byte*
ValidateArguments ( byte input, int startIndex, int length, byte output ) : void

Method Details

Clone() public method

Clone the UUDecoder with its current state.
Creates a new UUDecoder with exactly the same state as the current decoder.
public Clone ( ) : IMimeDecoder
return IMimeDecoder

Decode() public method

Decodes the specified input into the output buffer.

Decodes the specified input into the output buffer.

The output buffer should be large enough to hold all of the decoded input. For estimating the size needed for the output buffer, see EstimateOutputLength.

public Decode ( byte input, int length, byte output ) : int
input byte A pointer to the beginning of the input buffer.
length int The length of the input buffer.
output byte A pointer to the beginning of the output buffer.
return int

Decode() public method

Decodes the specified input into the output buffer.

Decodes the specified input into the output buffer.

The output buffer should be large enough to hold all of the decoded input. For estimating the size needed for the output buffer, see EstimateOutputLength.

/// is null. /// -or- /// is null. /// /// and do not specify /// a valid range in the byte array. /// /// is not large enough to contain the encoded content. /// Use the method to properly determine the /// necessary length of the byte array. ///
public Decode ( byte input, int startIndex, int length, byte output ) : int
input byte The input buffer.
startIndex int The starting index of the input buffer.
length int The length of the input buffer.
output byte The output buffer.
return int

EstimateOutputLength() public method

Estimates the length of the output.
Estimates the number of bytes needed to decode the specified number of input bytes.
public EstimateOutputLength ( int inputLength ) : int
inputLength int The input length.
return int

Reset() public method

Resets the decoder.
Resets the state of the decoder.
public Reset ( ) : void
return void

UUDecoder() public method

Initializes a new instance of the MimeKit.Encodings.UUDecoder class.
Creates a new Unix-to-Unix decoder.
public UUDecoder ( ) : System
return System

UUDecoder() public method

Initializes a new instance of the MimeKit.Encodings.UUDecoder class.
Creates a new Unix-to-Unix decoder.
public UUDecoder ( bool payloadOnly ) : System
payloadOnly bool /// If true, decoding begins immediately rather than after finding a begin-line. ///
return System