class Encoder
Converts a set of characters into a sequence of bytes.
public void Convert( char* chars, int charCount, byte* bytes, int byteCount, bool flush, ref int charsUsed, ref int bytesUsed, ref bool completed )
Converts a buffer of Unicode characters to an encoded byte sequence and stores the result in another buffer.
charsThe address of a string of UTF-16 encoded characters to convert.charCountThe number of characters in to convert.bytesThe address of a buffer to store the converted bytes.byteCountThe maximum number of bytes in to use in the conversion.flushto indicate no further data is to be converted; otherwise, .charsUsedWhen this method returns, contains the number of characters from that were used in the conversion. This parameter is passed uninitialized.bytesUsedWhen this method returns, contains the number of bytes that were used in the conversion. This parameter is passed uninitialized.completedWhen this method returns, contains if all the characters specified by were converted; otherwise, . This parameter is passed uninitialized.
public void Convert( char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, int byteCount, bool flush, ref int charsUsed, ref int bytesUsed, ref bool completed )
Converts an array of Unicode characters to an encoded byte sequence and stores the result in an array of bytes.
charsAn array of characters to convert.charIndexThe first element of to convert.charCountThe number of elements of to convert.bytesAn array where the converted bytes are stored.byteIndexThe first element of in which data is stored.byteCountThe maximum number of elements of to use in the conversion.flushto indicate no further data is to be converted; otherwise, .charsUsedWhen this method returns, contains the number of characters from that were used in the conversion. This parameter is passed uninitialized.bytesUsedWhen this method returns, contains the number of bytes that were produced by the conversion. This parameter is passed uninitialized.completedWhen this method returns, contains if all the characters specified by were converted; otherwise, . This parameter is passed uninitialized.
public EncoderFallback Fallback { get; set; }
Gets or sets a object for the current object.
- Returns A object.
public EncoderFallbackBuffer FallbackBuffer { get; }
Gets the object associated with the current object.
- Returns A object.
public int GetByteCount( char* chars, int count, bool flush )
When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer. A parameter indicates whether to clear the internal state of the encoder after the calculation.
charsA pointer to the first character to encode.countThe number of characters to encode.flushto simulate clearing the internal state of the encoder after the calculation; otherwise, .- Returns The number of bytes produced by encoding the specified characters and any characters in the internal buffer.
public int GetByteCount( char[] chars, int index, int count, bool flush )
When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters from the specified character array. A parameter indicates whether to clear the internal state of the encoder after the calculation.
charsThe character array containing the set of characters to encode.indexThe index of the first character to encode.countThe number of characters to encode.flushto simulate clearing the internal state of the encoder after the calculation; otherwise, .- Returns The number of bytes produced by encoding the specified characters and any characters in the internal buffer.
public int GetBytes( char* chars, int charCount, byte* bytes, int byteCount, bool flush )
When overridden in a derived class, encodes a set of characters starting at the specified character pointer and any characters in the internal buffer into a sequence of bytes that are stored starting at the specified byte pointer. A parameter indicates whether to clear the internal state of the encoder after the conversion.
charsA pointer to the first character to encode.charCountThe number of characters to encode.bytesA pointer to the location at which to start writing the resulting sequence of bytes.byteCountThe maximum number of bytes to write.flushto clear the internal state of the encoder after the conversion; otherwise, .- Returns The actual number of bytes written at the location indicated by the parameter.
public int GetBytes( char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, bool flush )
When overridden in a derived class, encodes a set of characters from the specified character array and any characters in the internal buffer into the specified byte array. A parameter indicates whether to clear the internal state of the encoder after the conversion.
charsThe character array containing the set of characters to encode.charIndexThe index of the first character to encode.charCountThe number of characters to encode.bytesThe byte array to contain the resulting sequence of bytes.byteIndexThe index at which to start writing the resulting sequence of bytes.flushto clear the internal state of the encoder after the conversion; otherwise, .- Returns The actual number of bytes written into .
public void Reset( )
😔 No documentation found.
public int GetByteCount( ReadOnlySpan<char> chars, bool flush )
😔 No documentation found.
public int GetBytes( ReadOnlySpan<char> chars, Span<byte> bytes, bool flush )
😔 No documentation found.
public void Convert( ReadOnlySpan<char> chars, Span<byte> bytes, bool flush, ref int charsUsed, ref int bytesUsed, ref bool completed )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.