C# Class Renci.SshNet.Common.ASCIIEncoding

Inheritance: System.Text.Encoding
显示文件 Open project: sshnet/SSH.NET Class Usage Examples

Public Methods

Method Description
GetByteCount ( char chars, int index, int count ) : int

Calculates the number of bytes produced by encoding a set of characters from the specified character array.

GetBytes ( char chars, int charIndex, int charCount, byte bytes, int byteIndex ) : int

Encodes a set of characters from the specified character array into the specified byte array.

GetCharCount ( byte bytes, int index, int count ) : int

Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.

GetChars ( byte bytes, int byteIndex, int byteCount, char chars, int charIndex ) : int

Decodes a sequence of bytes from the specified byte array into the specified character array.

GetMaxByteCount ( int charCount ) : int

Calculates the maximum number of bytes produced by encoding the specified number of characters.

GetMaxCharCount ( int byteCount ) : int

Calculates the maximum number of characters produced by decoding the specified number of bytes.

Private Methods

Method Description
ASCIIEncoding ( ) : System

Method Details

GetByteCount() public method

Calculates the number of bytes produced by encoding a set of characters from the specified character array.
is null. or is less than zero.-or- and do not denote a valid range in .
public GetByteCount ( char chars, int index, int count ) : int
chars char The character array containing the set of characters to encode.
index int The index of the first character to encode.
count int The number of characters to encode.
return int

GetBytes() public method

Encodes a set of characters from the specified character array into the specified byte array.
is null.-or- is null. or or is less than zero.-or- and do not denote a valid range in .-or- is not a valid index in . does not have enough capacity from to the end of the array to accommodate the resulting bytes.
public GetBytes ( char chars, int charIndex, int charCount, byte bytes, int byteIndex ) : int
chars char The character array containing the set of characters to encode.
charIndex int The index of the first character to encode.
charCount int The number of characters to encode.
bytes byte The byte array to contain the resulting sequence of bytes.
byteIndex int The index at which to start writing the resulting sequence of bytes.
return int

GetCharCount() public method

Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
is null. or is less than zero.-or- and do not denote a valid range in .
public GetCharCount ( byte bytes, int index, int count ) : int
bytes byte The byte array containing the sequence of bytes to decode.
index int The index of the first byte to decode.
count int The number of bytes to decode.
return int

GetChars() public method

Decodes a sequence of bytes from the specified byte array into the specified character array.
is null.-or- is null. or or is less than zero.-or- and do not denote a valid range in .-or- is not a valid index in . does not have enough capacity from to the end of the array to accommodate the resulting characters.
public GetChars ( byte bytes, int byteIndex, int byteCount, char chars, int charIndex ) : int
bytes byte The byte array containing the sequence of bytes to decode.
byteIndex int The index of the first byte to decode.
byteCount int The number of bytes to decode.
chars char The character array to contain the resulting set of characters.
charIndex int The index at which to start writing the resulting set of characters.
return int

GetMaxByteCount() public method

Calculates the maximum number of bytes produced by encoding the specified number of characters.
is less than zero.
public GetMaxByteCount ( int charCount ) : int
charCount int The number of characters to encode.
return int

GetMaxCharCount() public method

Calculates the maximum number of characters produced by decoding the specified number of bytes.
is less than zero.
public GetMaxCharCount ( int byteCount ) : int
byteCount int The number of bytes to decode.
return int